York claimed their first away win of the season in League Two to consign bottom club Newport to their fifth defeat in six games.
James Berrett capitalised on a stray Aaron Hayden pass to find the bottom corner just before half-time.
Reece Thompson's glancing header doubled the lead and Vadaine Oliver tapped in to secure a comfortable win.
Newport ended with 10 men after Danny Holmes was shown two yellow cards in the space of eight minutes.
Newport manager Terry Butcher told Golsicilia.it Radio Wales: "I didn't see that coming. There was nothing between the sides in the first-half.
"We made a mistake, don't recover from it and they scored and that's what separated the asides at the interval.
"The second goal was a soft one from our point of view and I didn't see the third one because I was making substitutions.
"The sending off just compounded our display and the result."