However, Allegri has said that he was given the opportunity to make the switch to the Champions League winners, only to reject the approach having already committed his future to Juventus.
The 50-year-old told Sky Sport Italia: "I said no to Real Madrid. I did it on the phone to [Madrid president] Florentino Perez because I had given my word to [Juventus] president [Andrea] Agnelli.
"I thanked Florentino for the offer but said I couldn't accept it out of the respect I owed to Juventus."
Earlier this summer, Allegri was also linked with positions at Arsenal and Chelsea.