The 19-year-old became the youngest player in the history of Serie A to score a quadruple, as Massimiliano Allegri's men suffered a shocking defeat.
Early strikes from Robinho and Mario Balotelli meant Milan raced into a 2-0 lead after just 12 minutes before Berardi's first half hat trick and fourth of the night after the restart saw him become the youngest player to score four goals in a Serie A game since 1994-95 to secure a famous win for the home side in its first season in the top flight.
New signing Keisuke Honda made his Milan debut off the bench in the second half and hit the post before Riccardo Montolivo struck in the 86th minute to spark a frantic finale.
Giampaolo Pazzini came agonizingly close to equalizing only to see his header rattle the crossbar with the goal at his mercy after Pegolo Gianluca superbly palmed away Balotelli's initial effort.
Sassuolo, though, hung on to climb out of the bottom three and pile the pressure on Milan head coach Massimiliano Allegri.
Milan, which is wedged in mid-table, made two changes from the side that beat Atalanta on Monday, with Daniele Bonera and Balotelli both drafted in. Honda took his place among the substitutes.
Sassuolo coach Eusebio Di Francesco made five alterations to the side that lost away at Genoa last time out in a bid to end a run of four consecutive Serie A defeats.
Milan has only one win on the road in the league all season but quickly settled and took the lead just before the 10-minute mark.
A strong tackle by Nigel De Jong on the edge of the area allowed Robinho to race into the box and slot home with a cool finish.
It took Milan three minutes to double their lead as teenage playmaker Bryan Cristante surged down the right before picking out an unmarked Balotelli, who made no mistake from close range.
It looked like the makings of a long night for the hosts, but Milan's two-goal cushion only lasted two minutes.
Berardi beat the offside trap to get on the end of Jasmin Kurtic's threaded ball before rounding Christian Abbiati to finish from a tight angle.
Sassuolo's first goal in 536 minutes of football galvanised Di Francesco's men and they continued to press, with Berardi causing problems for the Milan defence.
And Berardi's persistence paid off again after 28 minutes. Bonera failed to deal with a ball into the box, allowing the 19-year old to get a shot away that was initially blocked by the center back before producing an expertly timed volley into the bottom corner beyond the grasp of Abbiati.
Simone Zaza's curling free kick produced a stunning save from Abbiati two minutes later, but the Milan keeper was picking the ball out of his net again just before the break.
A stunning counter-attack saw Alessandro Longhi find Berardi behind the defense, and the Italian thumped home for his second hat-trick of the season.
Allegri decided not to change things for the second half and his side fell further behind two minutes after the restart when Beradi beat Bonera to Kurtic's drilled cross to steer into the net.
Milan had previously not lost from a two-goal lead in 12 years, but continued to struggle, despite Balotelli and Kaka both having decent opportunities.
Honda was introduced midway through the second half and nearly produced an instant impact when his flick-on was deflected wide by Pazzini.
The Japanese playmaker looked lively and struck the woodwork late before Montolivo pulled back what turned out to be a consolation with drilled effort on the edge of the box.
Gianluca's heroics then denied Balotelli and Pazzini struck the bar with a six-yard header after the ball fell kindly to him.