The deal, valued at £60m, will be City's club-record signing, surpassing the £57m acquisition of Aymeric Laporte in January.
City are likely to spend more money before now and the transfer window closing on August 9.
The Algeria worldwide handed in a transfer request in January, but having failed to seal a move to the Etihad Stadium, the 27-year-old was initially told to stay away from first-team training for a 10-day period by his employers.
And Txiki Begiristain, City's director of football, says he is delighted to have finally captured one of the best players in the English top flight.
"Watching them from afar has been a pleasure".
Mahrez passed a medical at City's training ground on Tuesday and has agreed a five-year contract worth a mammoth £52m.
Riyad's progress with Leicester City also saw him firmly establish himself as a key member of the Algerian national team, with whom he played in the 2014 FIFA World Cup Finals and both the 2015 and 2017 Africa Cup of Nations.
"I am so pleased to have joined City, a side playing great football under Pep Guardiola", Mahrez told the club's official website.
'I think we can be successful over the coming years and I believe my own game can develop under Pep's management'.
He helped the Foxes to a shock Premier League title in 2016, scoring 17 times.
But the Premier League champions remained keen on Mahrez, who scored 13 goals in 41 appearances for Leicester last season.