The 28-year-old former England midfielder managed just 19 appearances since joining from Arsenal in 2018.
Wilshere had one year left on the three-year contract previous manager Manuel Pellegrini handed him, but West Ham have opted to cut their losses.
A club statement read: “West Ham United can confirm that the club has agreed with Jack Wilshere to a mutual termination of the midfielder’s contract.
We can confirm the departure of Josh Cullen and Jack Wilshere this evening on a permanent basis.
Everyone at West Ham United would like to wish them the very best in their future careers. pic.twitter.com/AXohLmhqdo
— West Ham United (@WestHam) October 5, 2020
“Everyone at West Ham United would like to wish Jack all the best for his future career.”
Wilshere, whose career has been blighted by injury, was due to face Charlton in the Carabao Cup this season only to roll an ankle in training.
He did make one appearance in the following round, playing the full 90 minutes in a 5-1 defeat of Hull.
However, that proved to be Wilshere’s final appearance for the club and he is now a free agent.
Meanwhile, Hammers midfielder Josh Cullen, who spent the last two seasons on loan at Charlton, has joined Anderlecht on a permanent basis and striker Xande Silva has been loaned to Aris Thessaloniki.