The result sees Pep Guardiola’s side move into the top half of the table into eighth place while Burnley remain a point above the relegation zone.
City opened the scoring in the first five minutes with Kevin De Bruyne setting up Mahrez inside the area to score.
Mahrez grabbed his second with a brilliant solo goal after he received a throw-in from Kyle Walker and danced past two defenders and finished with a curling shot.
The hosts thought they scored a third moments later but Torres’ header was ruled out for offside.
City did make it 3-0 just before the break after De Bruyne contributed another assist and Mendy volleyed in his cross.
Torres grabbed City’s fourth after 66 minutes before Mahrez completed his hat trick with a header two minutes later.