The 26-year-old midfielder is contracted to Bayern Munich until 2012 and chairman Karl-Heinz Rummenigge has repeatedly said he is not for sale.
The German champions are keen for their star playmaker to agree a new deal before next summer to prevent him entering the last year of his contract and potentially losing him on a free transfer.
Schweinsteiger is therefore weighing up his options and Khedira admits he has been sounded him out about life in Madrid.
"Bastian has asked me about how things work at Real," he told German magazine Sport-Bild.
"We had talked before about things Mourinho had said, as we have a very good, open relationship."
Khedira has been a regular in Real's starting line-up since making a 14million euro move from Stuttgart in July.
The 23-year-old midfielder believes moving overseas would also only benefit Schweinsteiger's career and, asked if his international team-mate would succeed in Spain, Khedira was of little doubt.
"Bastian is one of the few players who would prevail anywhere he plays," he said.
"I would never give out advice about it: some people want to play for foreign clubs, some don't.
"Bayern is a great club, one of the best in the world, but I think that experience at a top club abroad doesn't hurt."