Rookie boss Pirlo signed a two-year deal to take over from Maurizio Sarri as Bianconeri boss last August, but the 42-year-old failed to live up to expectations.
The former Italy playmaker failed to guide Juve to what would have been a 10th consecutive Serie A title and appears to have paid the price.
Italian sport dailies La Gazzetta dello Sport and Corriere dello Sport both reported an agreement had been reached with Allegri.
Juventus edged into the Champions League for 2021-22 by finishing fourth as Inter won the Scudetto,
Allegri has been out of work since leaving the Turin giants two years ago, but he had been linked with Real Madrid before news emerged of the likely change at Juventus.
Juventus were champions of Italy in five consecutive seasons under the experienced Allegri.