Moyes, 55, took over from Slaven Bilic on a short-term contract in November with the club in the relegation zone.
West Ham secured safety with two games to spare and finished 13th. Moyes met senior figures at the club on Monday.
The former Everton and Manchester United boss recorded nine wins and 10 draws from 31 games as West Ham boss.
“When David and his team arrived, it was the wish of both parties that the focus be only on the six months until the end of the season, at which point a decision would be made with regards to the future,” said West Ham joint-chairman David Sullivan.
“We feel that it is right to move in a different direction. We aim to appoint a high-calibre figure who we feel will lead the club into an exciting future for our loyal supporters within the next 10 days.”
Moyes’ assistants Alan Irvine, Stuart Pearce and Billy McKinlay have also left with immediate effect.
‘Even Guardiola took a bit of time to get his team right’
West Ham finished nine points clear of the drop zone, after earning seven points out of the last nine.
Moyes’ last game in charge was a 3-1 win over Everton on Sunday, after which he suggested his preference was to stay beyond this season.
“Everybody always thinks the grass is greener and there’s something better out there. I would say more often than not I bet you it’s proved wrong,” said Moyes.
“We’ve shown we’re trying to improve. I don’t know if anybody can come and make that big a difference in six months. Even Pep Guardiola took a bit of time to get his team right.
“I’d think you’d need to give a bit longer. But every manager now is in transit. I don’t think there is a long period.”