Pirlo signed a two-year contract that runs until June 30, 2022.
"Today's choice is based on the belief that Pirlo has what it takes to lead from his debut on the bench, an expert and talented squad to pursue new successes," the club said in a statement.
The 41-year-old was named the coach of Juventus' Under-23 team just 10 days ago and ascends to the top job without having managed a single game.
A host of high-profile names were linked with the vacant position in Turin following Sarri's sacking earlier Saturday; the likes of Mauricio Pochettino, Zinedine Zidane, and Simone Inzaghi were all tipped as potential successors to Sarri, who was axed after winning the Serie A title in his lone season with the club.
Instead, Juve have gone for a wild-card option in the form of the inexperienced ex-player, a route that's become more prevalent among some of Europe's biggest sides in recent years.
"The decision for Pirlo was very natural, in the Juventus style, because he is someone who as we said just over a week ago played with us, has always been in contact with everyone here and it felt natural," director Fabio Paratici said of the decision, according to Football Italia.
He added: "We also believe he is destined for greatness. He was as a player and we think with confidence he can do the same as a coach."
If nothing else, Pirlo will immediately be comfortable at the Allianz Arena. He spent four seasons with the Bianconeri as a player, reviving his career after arriving on a free transfer in 2011. Pirlo won four Serie A titles and one Coppa Italia crown with Juve before departing for Major League Soccer in 2015.