The Germany international fell awkwardly following a collision with Cornella midfielder David Garcia and was replaced early in the second half of the Copa del Rey encounter at the Santiago Bernabeu stadium.
The 27-year-old suffered a concussion and was taken to hospital, where he spent the night under observation.
A statement from Real Madrid read: “Following neurological exams performed on Sami Khedira today in the Sanitas La Moraleja hospital, the player has been discharged.”
Khedira is expected to be available for Saturday’s home match against Celta Vigo.
Real lead the Primera Division standings, two points clear of nearest rivals Barcelona.