The goalkeeper made 43 appearances in all competitions since rejoining Real Madrid in 2015, but leaves for England's second tier after dropping to third choice behind Thibaut Courtois and Keylor Navas at the Santiago Bernabeu.
Casilla is contracted with the West Yorkshire club until 2023.
The 32-year-old began his career with Real Madrid but left for Espanyol in 2007. Following loan spells at Cadiz and Cartagena, Casilla managed to lock down the No. 1 spot between the sticks for his club and earned his single cap for Spain in 2014.
His return to Real Madrid was followed by a deluge of silverware. Casilla is a three-time Champions League winner, has won La Liga once, hoisted three Club World Cups, and won two UEFA Super Cups. This season, however, he has only appeared as an unused substitute, and last took the pitch for Los Blancos in a preseason friendly against Manchester United.
Casilla's arrival should spell the end of Bailey Peacock-Farrell's reign with the gloves at Leeds. The Northern Irish international has drawn praise this term, but has also committed a few errors that have led to doubts over his long-term suitability for Marcelo Bielsa's ambitious squad.
Casilla, who has been assigned the No. 33 shirt, should be in contention to start in Saturday's match at Stoke City.