The Argentine has spent eight years at the club after initially joining on loan from United Arab Emirates side Al Jazira in 2015.
After impressing, Lanzini signed a permanent deal the following year and went on to make 226 appearances, scoring 32 goals.
During his time at the club, Lanzini won the club's Goal of the Season award twice and was the Hammer of the Year runner-up in 2016/17.
He made eleven appearances during West Ham's recent Europa Conference League success, scoring twice during the triumphant run.
Meanwhile, Angelo Ogbonna has been offered a new contract at the club after recovering from major knee surgery.
Read more on West Ham
Nolan opens up on Rice future and hails West Ham star as 'closest thing to Gerrard'
West Ham keen to sell £30m striker after one season
The Italian's hopes of a new deal were helped by his 30 appearances during the 2022/23 campaign.
The club also announced that a number of its development squad players will be leaving this summer.
Ademipo Odubeko, Armstrong Oko-Flex and Brian Kinnear will be seeking pastures new this summer as will Asher Falase.
West Ham confirmed defender Jamal Baptiste will depart at the end of the month despite being offered a new contract.
Most read in Football
Arsenal plot new Rice bid and Havertz offer, Bayern want Walker, United takeover latest
Man United transfer news LIVE: Greenwood retained, new Mount bid readied, De Gea talks
Arsenal to launch official bid for Havertz with Chelsea star keen on transfer
I released Harry Kane from Arsenal academy at 12 as I didn't think he'd make it
Ryan Battrum, Billy Bates, Sean Tarima and Mason Terry have all signed their first professional contracts with the Club.
Boss David Moyes faces an intriguing summer as he shapes his squad ahead of European and domestic duties.
It remains to be seen whether captain Declan Rice will still be at the club with Arsenal already having an offer rejected for the England international.
Moyes will hope to recoup any funds from Rice's potential sale to bolster his midfield and attack, with Leicester's Harvey Barnes and Fulham's Joao Palhinha both linked with moves to the club.