The Premier League leaders didn’t have an easy ride in a full-blooded fifth-round tie against a team 82 places below them in League Two.
Newport had already knocked out Premier League side Leicester and Championship outfit Middlesbrough in the previous two rounds, and Pep Guardiola’s men were indebted to Ederson for a superb save to keep them level during a lacklustre first-half display.
But they eventually hit their stride in the second half and Leroy Sane’s powerful finish put them ahead before Phil Foden doubled the lead.
Newport refused to surrender and Padraig Amond’s late goal could have set up a tense finale, only for Foden to net again 79 seconds later before Riyad Mahrez wrapped up the win.
“It was a really tough game. We opened the scoring in the game and believed it was done. They showed us how incredible they are and a big compliment for them,” Guardiola said.
“The home crowd was amazing, winning here, I understand English football today better than ever and how tough the cup is in these conditions.”
Earlier, Brighton moved into the quarter-finals for the second successive season as goals from Anthony Knockaert and Jurgen Locadia clinched a 2-1 win over Frank Lampard’s Derby.
Championship strugglers Millwall are also through to the quarter-finals after a 1-0 win at third-tier AFC Wimbledon.