Seventh-placed Juventus fell to their third Serie A defeat of the season as Maxime Lopez's injury-time strike gave Sassuolo a memorable win.
The mid-table visitors led when Davide Frattesi ran onto's Gregoire Defrel through ball to finish.
Weston McKennie looked to have rescued a point for Juventus with a header from Paulo Dybala's deep free-kick.
But Lopez ran onto Domenico Berardi's brilliant crossfield ball and chipped Mattia Perin with almost the last kick.
"These are the sorts of matches that you can't lose if you know you're not going to win them," said Massimiliano Allegri, who became only the third man to manage Juventus in 200 Serie A games.
"We need to think about how we handle games, you can't concede a goal like that on the counter. Juve never let in goals like today and it needs to never happen again."
They now sit 13 points behind leaders AC Milan.