The 33-year-old, who currently plays for Juventus, has admitted that he previously "reached an agreement" with Chelsea, but was convinced to remain in Italy.
"I had already reached an agreement with Chelsea, but [president Silvio] Berlusconi intervened and I stayed at AC Milan," he told Voetbal Primeur.
"I was also very close to a move to Real Madrid in 2006, when coach [Fabio] Capello was there. And [Pep] Guardiola approached me in 2011 to convince me to go to Barcelona, but again it was Berlusconi who put a stop to it."
Pirlo is still regarded as one of the best central midfielders in world football.