The 23-year-old France international completed a medical with his new club while on international duty with France on Tuesday, after Real Madrid met Lyons asking price of €55m and agreed terms with the player.
The club statement reads: "Real Madrid CF and Olympique Lyonnais have agreed to the transfer of player Ferland Mendy. The player is linked to the club during the next six seasons, until June 30, 2025.
"Mendy will be presented next Wednesday, June 19, at 1:00 p.m., in the VIP box at the Santiago Bernabéu stadium. Subsequently, Mendy will step on the turf of Santiago Bernabéu for the first time wearing the Real Madrid CF jersey and will attend the media in the press room."
Mendy, who joined Lyon from Le Havre for just €5m back in 2017, became one of the most coveted full backs in world football thanks to his progress with Les Gones, attracting attention from both Barcelona and Juventus as well as Real Madrid.
It is understood that Los Blancos officials flew to France to negotiate with new Lyon director Juninho Pernambucano, as they hurried to come to a swift agreement for the player they hope will become Marcelos successor at the Santiago Bernabeu.
Mendy is already Madrids fifth signing of the summer after Eden Hazard, Rodrygo Goes, Eder Militao and Luka Jovic, with the clubs total transfer fee outlay currently at around €215m.