Theo Walcott and substitute Olivier Giroud were the other scorers and victory lifted the Gunners to fifth place in the Premier League, improving their hopes of a top-four finish — and with that the likelihood that Wenger will stay at the club next season.
Defeat for the Hammers was their fourth successive loss and leaves them in a perilous position just above the relegation places and falling fast, piling the pressure on manager Slaven Bilic.
Wenger’s pre-match mood was not improved by injury robbing him of goalkeepers Petr Cech and David Ospina, which handed a rare Premier League start to Emiliano Martinez.
Martinez’s first moment of alarm arrived in the eighth minute at the Emirates when Michail Antonio was brought down on the edge of the Arsenal area but Manuel Lanzini’s free-kick was just too high.
Arsenal recovered and felt they had been denied a penalty in the 18th minute when Arthur Masuaku appeared to have brought Walcott down, but referee Martin Atkinson booked Arsenal defender Hector Bellerin for fouling Antonio on the counter-attack.
Alexis Sanchez’s clever free-kick found Danny Welbeck’s run behind the defence but the Arsenal striker could not make contact in front of goal.
West Ham survived a frantic Arsenal onslaught before half time with Bellerin and Mohamed Elneny seeing shots blocked by defenders and Darren Randolph saving at Walcott’s feet.
Arsenal dominated the start of the second half and Jose Fonte and Masuaku needed treatment after colliding in the West Ham box.
Ozil broke the deadlock in the 58th minute by firing Fonte’s poor clearance past Randolph. Sanchez and Welbeck were in front of the goalkeeper and seemingly offside but the goal stood.
An increasingly desperate Bilic threw on Diafra Sakho to replace Andy Carroll up front for his first West Ham game since November.
But Walcott made it 2-0 in the 68th minute, Ozil supplying the cross from the left after a neat one-two with Sanchez.
Martinez hadn’t had much to do but was alert enough to deny Lanzini and West Ham a chance of getting back into the match.
Giroud, on for Welbeck, made sure that didn’t happen by cutting inside on the right of the box to plant a curling effort past Randolph seven minutes from time.