Fabio Capello has resigned as coach of Juventus, the club said on Tuesday.
Capello had success at Real almost a decade ago
The news came as a prosecutor called for the Italian champions to be demoted from Serie A at a sport tribunal investigating match-fixing claims.
New Real Madrid president Ramon Calderon earlier said he hopes Capello will return to the Spanish club, where he won the championship in 1997.
Capello, 60, claimed two straight titles at Juve, although those honours are under threat from the inquiry.
A statement on the club's official website said: "Juventus Football Club has accepted the resignation of Fabio Capello, in accordance with his wishes, and thanks him for the work that he has done."
Juventus are one of four Italian sides facing the tribunal where prosecutor Stefano Palazzi has called for them to drop two divisions and for AC Milan, Fiorentina and Lazio to drop one.
Capello's resignation paves the way for a return to Real, and Calderon said he hopes to appoint him by the end of the week.
Before Capello's departure was announced, the Madrid president said: ""He has no problems leaving Juventus because he has a series of clauses that allow him to do so.
"Real Madrid will not have to pay a fee to get him."
Calderon was elected following a controversial vote on Sunday, where postal votes were discounted.
He also intends to bring in several players, including Arsenal's Cesc Fabregas and Chelsea's Arjen Robben, as well as Brazil star Kaka from AC Milan.