Djamel Belmadi's side, yet to concede a goal in the 2019 finals, made light work of its opponent in front of a sparse crowd in Cairo.
Youcef Belaili broke the deadlock 24 minutes in with a precise finish and Mahrez made the win safe in expert fashion before the hour mark, with Adam Ounas adding gloss to the scoreline after a swift counter-attack.
Algeria allowed only one shot on target throughout the match as they underlined its credentials as one of the favourites for the title, its chances having grown after the shock exits of Morocco and host nation Egypt.
Baghdad Bounedjah missed a golden chance to open the scoring 20 minutes in, side-footing over the bar after bringing down Adlene Guedioura's cross just six yards from goal.
Bounedjah made amends four minutes later, though, collecting Belaili's pass and flicking the return into his path, allowing the Esperance forward to slot past goalkeeper Ibrahim Kone.
Mohamed Camara stung the hands of Rais M'bolhi with a fierce strike, but Guinea's resistance effectively ended 57 minutes in, when Mahrez expertly eased away from Issiaga Sylla before sending Kone the wrong way.
Substitute Ounas completed the scoring by blasting home from 12 yards out after Youcef Atal crossed low from the right, meaning Algeria will head into a quarter-final against either Ivory Coast or Mali in confident fashion.