First half goals from striker Chris Zebroski and midfielder Lee Minshull plus a late strike from Danny Crow ended a run of three games without a goal for Justin Edinburgh's side.
County looked in control from the first whistle and could have been in front inside a minute but Adam Chapman's volley from the edge of the box crashed off the crossbar.
Newport's first goal came in the 23rd minute when a quick County attack saw Conor Washington's cross slotted home by Zebroski.
York had the chance to bring themselves back into it in the 31st minute when County goalkeeper Lenny Pidgeley picked up a back pass but Josh Carson wasted the free kick from 12 yards.
The missed proved costly when Minshull got County's second with a neat turn and finish in the 45th minute.
County got their third goal with a minute remaining when Crow tapped in Robbie Willmott's driven free kick at the back post.