Erling Haaland opened the scoring in the 10th minute before Fabio Carvalho equalised for the visitors.
Riyad Mahrez restored City's lead immediately after half-time before Liverpool again pegged us back, this time through Mo Salah.
With a winner required on the night, both sides chased the third but it was City who prevailed thanks to a powerful Nathan Ake header just before the hour mark.
The win sees City through to the last eight of the Carabao Cup where we will face Southampton.
Click on the video above to see the key moments...