The 31-year-old becomes the latest Premier League star to move to Saudi Arabia and will link up with the Jeddah-based side ahead of the 2023-24 season.
However, Mendy struggled for form last season and underwent surgery in January after fracturing his finger, eventually losing his status as the club's No. 1 goalkeeper to teammate Kepa Arrizabalaga.
Al Ahli won the Saudi First Division League title last season and achieved promotion back to the Saudi Pro League for the 2023-24 season.
Al Ahli are one of four clubs, along with Al Hilal, Al Ittihad and Al Nassr, who were taken under the ownserhip of Newcastle United's owners, the Saudi Arabia Public Investment Fund (PIF) earlier this month as part of the country's so-called "Sports Clubs Investment and Privatization Project."
Saudi clubs have engaged in an aggressive recruitment strategy this summer, offering lucrative contracts to some of the sport's biggest names -- Karim Benzema has joined Al Ittihad while Mendy's former Chelsea teammates N'Golo Kante and Kalidou Koulibaly have also moved to the Saudi Pro League.