The Germany international has just one year remaining on his current contract and has so far declined to sign a new deal, but his wage demands have put off rival suitors
Khedira has just one year remaining on his current contract with Los Blancos and has been the subject of significant interest from Arsenal, Chelsea and Bayern Munich.
But earlier this summer Goal revealed that the Germany international's £200,000-a-week wage demands were proving a stumbling block to any agreement, and Ancelotti has now revealed the midfielder will at least see out his contract.
"Khedira is happy here and he is staying," Ancelotti told reporters. "The matter is resolved & he stays at Real Madrid."
Ancelotti's latest comments are something of a surprise after Khedira was quoted by Bild on Saturday as claiming he was "a little out of Real Madrid".
The Spanish giants have splashed out over £80 million to bring Colombian sensation James Rodriguez and World Cup-winning playmaker Toni Kroos to Santiago Bernabeu this summer.