Pirlo's Juventus side were knocked out of the Champions League at the last-16 stage by Porto
Juventus have reappointed former boss Massimiliano Allegri just hours after sacking Andrea Pirlo.
Former Italian international Pirlo, 42, was a surprise choice when he took over from Maurizio Sarri last summer.
Juventus ended fourth in Serie A under their former player to miss out on the title for the first time since 2012.
Allegri was in charge of Juventus from 2014-19, winning five successive league titles, four Coppa Italias and reaching the Champions League final twice.
"Now we are ready to begin again with Allegri, to build our future together with his enormous professionalism, his moral strength, with the brilliant ideas of a coach capable of shuffling the cards, both on and off the pitch," said a Juventus statement.
Allegri, 53, had been out of football since leaving Juventus in June 2019.
His arrival comes after the departure of Pirlo who led Juve to the Italian Super Cup and Coppa Italia titles, but they were not enough to keep his job.
Pirlo played 164 games for Juventus between 2011 and 2015 and won four Serie A titles in Turin after joining from AC Milan, with whom he spent most of his career and won two Champions League and two league titles.
He also earned 116 caps for Italy and helped them to win the 2006 World Cup, retiring in 2017 having spent two years in Major League Soccer at New York City FC after leaving Juventus.
A statement on the Juventus website said: "Thanks Andrea. These are the first words that all of us must pronounce at the end of this special experience lived together.
"For the courage, the dedication, the passion with which he demonstrated every day, our thanks go to the 'Maestro', the coach and to Andrea, that really comes from the heart, as well as our good luck for the future that will surely be a wonderful one."
Pirlo added: "It's been an intense, complicated year but still wonderful. When I got the call from Juventus, I never thought about the risk I was taking.
"If I had to go back, I would make the exact same choice again, although aware of all the obstacles I encountered in such a difficult time for everyone, which prevented me from better planning my intentions and my style of play.
"This adventure, despite an unexpected ending, made it even clearer what I would like my future to be, which I hope will be just as complete and fulfilling as the one I experienced as a player."
It is the latest managerial move among Europe's big clubs with Antonio Conte leaving Inter Milan to be replaced by former Lazio boss Simone Inzaghi and Zinedine Zidane departing Real Madrid.
- Why are Europe's top managers on the move?