Youcef Belaili put the Desert Foxes ahead on 24 minutes and former African Footballer of the Year Mahrez added a second after 57 minutes in the last-16 match at the 30 June Stadium.
Substitute Adam Ounas was on the field only five minutes when he completed the rout with eight remaining, connecting with a low cross to give goalkeeper Ibrahim Kone no chance.
With hosts Egypt and Herve Renard-coached Morocco suffering stunning last-16 losses, many pundits are tipping Algeria to go all the way and add to their lone title, won in 1990.
They are only nation among the 10 survivors boasting a 100 percent record having beaten Kenya, highly-rated Senegal and Tanzania in group matches to reach the knockout phase.
Algeria will face the Ivory Coast or Mali in a quarter-final in Suez Thursday then, if successful, Nigeria or South Africa for a place in the July 19 final.
Coach Djamel Belmadi changed nine of the team that outclassed Tanzania in their final group game, restoring a host of first choices like Mahrez.
Guinea meanwhile were missing Liverpool midfielder Naby Keita after he was forced to leave Egypt owing to a recurrence of a groin injury sustained against Barcelona in May.
The referee was kept busy during physical early exchanges, booking Guinean Mady Camara and Algerian Adlane Guedioura within 14 minutes of the kick-off.
Camara was punished for a blatant foul on Mahrez, but Guedioura fired wide from the resultant free-kick close to the box.
Guedioura was then booked for a foul on Martinez Kante in a case of mistaken identity as big-screen replays showed the offender was Aissa Mandi.
Baghdad Bounedjah wasted a great chance to put Algeria ahead on 20 minutes when he controlled a Guedioura cross with his chest, then blazed wide with only the goalkeeper to beat.
Bounedjah, who came to the Cup of Nations after scoring 39 goals for Qatari champions Al Sadd last season, atoned for his miss by helping Algeria take the lead.
His backheel inside the penalty area allowed Belaili to beat Kone from the tightest of angles with a shot that went into the far corner of the net.
There were more fouls than goal attempts during the remainder of a niggly opening half that finished with Algeria retaining the 1-0 advantage.
Kante became the second Guinean to be yellow-carded, for fouling Djamel Benlamri, and coach Paul Put reacted by taking him off and sending on Fode Koita.
Koita was barely on the field when Algeria doubled their lead as Mahrez collected an Ismael Bennacer cross, cut inside Issiaga Sylla and sent Kone the wrong way.
The match had long ceased to be a contest when Ounas claimed his third goal of the competition, joining three other players at the top of the scoring charts.