The reigning Italian champion has announced that the 46-year-old is the new man in charge with immediate effect.
The Serie A champion was looking for a new trainer following the shock departure of Antonio Conte on Tuesday and the club has now named the former AC Milan coach as its new boss.
Allegri had been out of work ever since he was fired by the San Siro side back in January and he will now be looking to redeem himself at Juventus.
WORLD CUP: Beautiful people | Germany homecoming
The 46-year-old started his coaching career at Aglianese and also took charge of Real SPAL, Grosseto, Sassuolo and Cagliari before taking over at Milan in 2010.
He guided the San Siro outfit to the Serie A title in his first season, but failed to replicate that feat in the following seasons - partially due to the departure of stars such as Thiago Silva and Zlatan Ibrahimovic.
Allegri will be looking to guide Juventus - which confirmed the deal on Twitter - to its fourth consecutive Scudetto, while the club's board of directors will also expect European success.
Juventus was disappointingly eliminated in the group stages of the Champions League last term after making it to the quarterfinals the season before.