Oumar Niasse bagged a consolation goal for the visitors late in the day.
After a drab final game of the season, both sides will be looking to put their respective difficult campaigns behind them and move into the summer with a clean slate.
Both sides are set for a summer of turnover with neither manager, David Moyes or Sam Allardyce, knowing their future at their respective club.
The pair will be hoping for some clarity in the following days.
Despite the impending turnover, it was the hosts who gave their fans some joy heading into the summer.
The opening goal came after 38 minutes when West Ham finally made their first-half domination pay.
Cheikhou Kouyate’s through ball - aimed for Arnautovic - missed the Austrian forward but his miscontrol allowed the ball to roll through to Lanzini.
The Argentine, unmarked, dragged his shot across Jordan Pickford - wrong-footing the goalkeeper - and giving the Hammers the lead.
Arnautovic doubled the hosts lead on the hour mark.
The Austrian international picked up the ball 20 yards from goal, spun off a charging Michael Keane and then unleashed a rocket strike that left Pickford beaten.
Niasse grabbed a consolation goal for the visitors with 15 minutes to play, smashing home from a corner to beat Adrian.
Lanzini bagged his brace and wrapped up the points with eight minutes to go with a curled effort from just inside the 18-yard box.
Hosts make first-half control count
The hosts were on top for the majority of the first-half and controlled play.
Despite losing Arthur Masuaku after 15 minutes after a poor tackle from Ramiro Funes Mori, Moyes’ side began to ramp up their control on the game.
Pickford kept the game left with a superb save after wonderful interplay from Arnautovic and Mark Noble.
Noble, from a tight angle inside the 18-yard box, looked to bend one low into Pickford’s far corner but the England keeper produced a save of the highest quality.
Joao Mario then flashed wide after a good solo run as the hosts pressed for an opener.
A mistake from Angelo Ogbonna lets Niasse in one on one but the Senegalese forward attempted to slot his effort past Adrian at his near post but the Spanish keeper was equal to it.
It was Niasse, again, who had Everton’s best chance in the first-half. His trademark tenacity allowed him to win possession just outside the Hammers area.
He played a one-two with Leighton Baines and attempted an effort from just outside the 18-yard box after a return ball - forcing Adrian into an awkward low save to his right.
The Blues fell behind to Lanzini’s goal and what little wind they had in their sails was knocked out.
Blues battle back but beaten
A half-time substitution saw Davy Klaassen enter the fray for Everton, replacing the booked and dangerously close to being sent-off Ramiro Funes Mori.
The Dutch midfielder, who has struggled to make an impact since signing from Ajax last summer, was immediately thrust into action with a volley from outside the West Ham box that was comfortably saved by Adrian.
However, he had a bigger impact at the wrong end - with his loose ball helping launch the Hammers counter-attack for their second goal.
Pickford may have felt he could done better for Arnautovic’s powerful long-range effort but the movement on the strike beat him all ends up.
More away day anger towards Allardyce was verbalised by the travelling Blues support throughout the afternoon.
Plenty of fans departed with 20 minutes to go, just in time to miss Niasse’s powerful close-range consolation goal.
They also missed Lanzini's curled effort that secured the points for Moyes' side but they'll be more concerned with their clubs future that is sure to be decided in the next few days.