Erling Haaland opened the scoring after ten minutes, before the visitors hit back ten minutes later through Fabio Carvalho.
Mahrez struck us ahead with a delightful curling strike just after the interval, before Mohamed Salah equalised instantly.
Nathan Ake headed in the winner just before the hour mark to knock out the defending champions and secure our progression into the last eight of the competition.
Mahrez, who was a contant nuisance for the Liverpool defence, was happy to be on the scoresheet in the victory.
“It’s always good to score and help the team to win,” he said. “Overall we were very good today and deserved to win.
“Everyone came back with a very good mentality and ready to start again. It was a tough opponent to start with but we did well.
“After the third goal we were very good defensively so we’re happy.”
The Algerian was constantly involved in City’s attacking play under the floodlights, having 50 touches of the ball in the full 90 minutes.
CITY+ | SIGN UP TO ACCESS EXCLUSIVE CONTENT
The winger has admitted that the team will remain grounded and take things one step at a time.
“I don’t know who’s left. We beat Chelsea and Liverpool who are two top teams.
“We will take it game by game and focus on the Premier League which is now the most important for us.”