The 24-year-old, a former Spanish U21 international, moved to Espanyol at the end of the 2007/08 season and made 97 appearances for the Barcelona-based club, scoring 10 goals.
A statement on the Real Madrid web site said:
“Three years after leaving Real Madrid, and having earned the experience and maturity required, Jose Callejon returns to the club that formed him as a player to work under Jose Mourinho.”
No financial details of the transfer have been released but reports in the Spanish media suggest that Real paid around five million euros for Callejon, who has signed a five-year contract.
Earlier this month, Real Madrid signed German-born Turkey midfielders Nuri Sahin from Borussia Dortmund and Hamit Altintop from Bayern Munich as Jose Mourinho retools his squad to better compete with Barcelona next season.