The flash point came in second-half stoppage time as Juventus saw out a 2-1 victory in their latest Serie A match, with Cristiano Ronaldo scoring twice.
Sassuolo had just pulled a goal back through Khouma Babacar when Costa and Di Francesco squared up.
Brazilian winger Costa already looked to have lost his composure after aiming an elbow and a headbutt moments earlier – but the worst was to come as he spat directly at Di Francesco from inches away.
Costa was sent off after the intervention of the video assistant referee.
Juventus head coach Massimiliano Allegri admitted the behaviour was unacceptable, and Costa later offered his mea culpa on Instagram.
He wrote: "I would like to apologise to all Juventus fans for this misleading reaction in today's game. I also apologise to my team-mates, who are always with me in beautiful and bad moments.
"It was a bad mistake, I am aware of it and I apologise to everyone for this. I make it clear that this isolated attitude does not correspond to what I have always shown in my career."
The 33-year-old Portugal forward had two great chances to add to the brace, but shot off-target on each occasion.
Allegri told the club's official website: "He came very close in his first three games.
"I think he rushed a couple of chances today – it looked like he was absolutely desperate to score.
"Football has a way of evening things out and that was the story of the first goal, with the ball bouncing off the post and sitting up for him. The second goal was brilliant. I'm happy for him.
Ronaldo was delighted to get off the mark for his new club.
"Sassuolo played well, but we showed good intensity and created a lot of chances," he added.
"I wanted to score, but the most important thing is to perform well and win matches.
"Of course there was a lot of attention on my move to Turin, but that's life. I'm happy, I'm working hard and my team-mates are really helping me to adapt to this league." body check tags ::