Sarri was sacked earlier on Saturday after Juventus were knocked out of the UEFA Champions League by Olympique Lyon on Friday.
The former Chelsea and Napoli boss was ruthlessly dismissed just one season into a three-year contract, and despite winning the Scudetto in his maiden campaign.
Pirlo, who was announced as manager of Juventus’ under-23 side just last week, has made an immediate step up and has signed a two-year contract at the Allianz Arena.
The Italian giants confirmed the appointment with a statement on their official website, which read: "Andrea Pirlo is the new Juventus coach.
"41-years-old and born in Flero in the province of Brescia, Pirlo has had a legendary career as a player that has led him to win everything, from the Champions League to the World Cup in 2006.
"In his four years at the centre of the Juventus midfield, Pirlo won as many league titles, a Coppa Italia and two Italian Super Cups.
"Today, begins a new chapter of his career in the world of football, as it was said almost a week ago: from Maestro to Mister.
"From today he will be THE coach for people of Juventus, as the club has decided to entrust him with the technical leadership of the First Team, after having already selected him for Juventus Under 23.
"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.
"Andrea Pirlo today signed a two-year contract until 30 June 2022."