The Bayern Munich winger claims that both los Blancos and Liga rivals Barcelona previously expressed an interest in taking him to Spain.
Ribery freely admits that he was particularly tempted by the prospect of following in Zidane's footsteps and making the move to the Santiago Bernabeu.
"Barcelona and Madrid are very big teams and there was a moment when both teams were interested in me," the 30-year-old France international told beIN Sport.
"I liked both but I had a moment in which I felt closer to Madrid than Barcelona. Zidane wanted me to go to Madrid and he tried all he could.
"But I am not interested now because Bayern is my family."
Ribery, of course, played a key role in the German side's historic treble triumph last season and is, therefore, considered by many as the frontrunner for this year's Ballon d'Or award.
The former Olympique de Marseille attacker will face stiff competition from Madrid ace Cristiano Ronald and Barcelona star Lionel Messi but Ribery fancies his chances of walking away with the prestigious accolade.
"I feel good about it," he confessed. "It is getting closer and closer. This has been one of my best years. I was lucky enough to win everything."