The Rossoneri were in negotiations with Los Blancos over the Brazilian's return to the club, but have now announced that financial problems have put an end to the deal
The Brazilian confirmed last week that he would be willing to take a pay-cut to move back to San Siro, having left the Rossoneri for the Spanish capital in 2009.
Galliani soon confirmed that the club had entered talks with the Spanish champions over a move for the player, but has now said that financial problems have put paid to the deal.
"The negotiations for Kaka have broken down," he told reporters. "It's not possible to complete the deal for fiscal reasons.
"We had agreed on everything else, but the deal broke down about an hour ago."
It is understood that the potential move collapsed because Milan failed to persuade the Santiago Bernabeu outfit to consider a loan deal for Kaka's services.
The 30-year-old has found form and first-team opportunities hard to come by at Madrid, and has only made seven Liga appearances this season, scoring in none of them.
His first spell at San Siro was between 2003 and 2009. During his time there, he won one Scudetto and one Champions League title.
The Milan CEO also commented to Sky Sports 24 on other players linked with the San Siro outfit, including Mario Balotelli and David Beckham.
A reporter - in possession of Panini stickers representing Kaka, Beckham and Balotelli - asked which player would be signed by the club before the end of the transfer window, to which Galliani said: "None of them."