Wilshere struck just before half-time and Pablo Fornals also opened his Hammers goal account following his £24million summer move from Villarreal.
Sky Bet League Two Newport came into the tie basking in a giant-killing reputation forged by FA Cup wins over Leicester, Leeds and Middlesbrough and a draw with Tottenham in the last couple of years.
Neither side had managed to get into their stride before Michail Antonio collapsed in the middle of his.
The Hammers speedster was bursting through on goal when he hit the turf with a suspected hamstring injury that is likely to keep him out for several weeks.
Felipe Anderson's early arrival was certainly not in the West Ham script, but the skilful Brazilian soon fashioned a move which saw Aaron Cresswell set up Fornals for a shot which struck a post.
Newport had chances as Padraig Amond fired tamely at the Spanish debutant Roberto from six yards and Issa Diop almost sliced Corey Whiteley's cross into his own net.
But West Ham seized control when Wilshere robbed Kyle Howkins two minutes before half-time and confidently slotted home, his first goal since scoring for former club Arsenal in January 2018.
Tristan Abrahams was inches away from equalising, the striker rather than the ball ending up in the net from Robbie Willmott's delicious cross.
West Ham gained breathing space after 65 minutes with Fornals finishing Anderson's cross, and Newport were denied a late consolation as Josh Sheehan's effort clattered off the crossbar.