The 28-year-old joined the Hammers from Arsenal on a free transfer two years ago but the fitness issues that plagued his career in North London followed him to the East.
Wilshere made only 19 appearances in all competitions in his two seasons at the London Stadium and he has not been included in any of David Moyes’ Premier League matchday squads this season.
The former Bolton Wanderers and Bournemouth loanee still had a year left on his contract but is now on the lookout for a new club.
Confirming his departure on Twitter, Wilshere wrote: "I can confirm that I have today agreed the termination of my contract with West Ham United.
"When I joined the club in the summer of 2018 I joined with great hopes and expectations and was excited to join the club I'd supported as a young boy.
"Unfortunately, despite all of my best efforts and intentions, it has not worked out as I'd expected. I have been fully fit for a large period of time at the club, including over the course of the last eight months - training hard every day - but unfortunately I have not been given the opportunity to play.
"Although I am of course frustrated that I was not able to fully showcase what I am capable of at West Ham I remain convinced that I can still contribute at the very top of the game.
"I am still incredibly hungry, ambitious and desperate to play football and achieve success. I'm still only 28 and feel fit, strong and ready to play.
"I'm looking forward to the future and hope to make an announcement about the next stage of my career in due course."
Wilshere has won 34 caps for the England national team but it has been four years since his last international appearance.