Olympique Lyonnais said on their website that Mendy had been transferred to Real Madrid for 48 million euros ($54.2 million), including possible additional incentives totaling up to five million euros.
Mendy will be presented on June 19 in the VIP box at Santiago Bernabeu Stadium, Real Madrid said on their website.
Real Madrid noted that Mendy scored three goals last season and also made his French national team debut in November in a friendly against Uruguay.
Mendy came through the ranks of Ligue 2 side Le Havre and made his debut with their top-flight team in 2015. He was named the best left back in Ligue 2 in 2016-2017, leading to his move to Lyon in the summer of 2017.
The French defender is the latest addition to a retooled Real Madrid side, who stumbled last season to a distant third-place finish in La Liga and a round of 16 exit in the Champions League after agreeing to transfer Cristiano Ronaldo to Juventus in July 2018.
Real Madrid presented Luka Jovic on Wednesday at Santiago Bernabeu Stadium in a ceremony in which the club's president, Florentino Perez, hailed the 21-year-old Serbian striker as "one of the greatest goal scorers in Europe."
Real Madrid have also added Belgian superstar Eden Hazard, whom they acquired from Premier League club Chelsea for a reported 100 million euros ($113 million). ALong with Hazard, Brazilian central defender Eder Militao (acquired from Portuguese side Porto) is now also a part of Real Madrid.
Another player, Brazil's Rodrygo Goes, is set to join the Blancos over the summer on a deal reached a year ago.