The Spanish full-back returns to Los Blancos after three seasons at Rayo Vallecano and has put pen to paper on a contract until June 2027.
"Real Madrid C. F. and Rayo Vallecano have agreed the transfer of the player Fran Garcia, who will be with the club for the next four seasons," Madrid said in a statement.
Madrid owned 50% of Garcia's sporting rights and have acquired the player's full rights for €5 million.
Garcia came through Madrid's youth ranks and made one appearance for the Spanish giants during the 2018-19 season before being sent out on loan to Rayo in 2020.
After helping the club to LaLiga promotion, Garcia signed permanently for Rayo in July 2021.
Garcia made 38 appearances to help Rayo finish 11th in LaLiga this past season.