The former Everton, Manchester and Real Sociedad manager saw his side finish bottom of the table after winning just six of their 38 games in a dismal campaign.
He had taken charge just last summer in the hope of reviving his career after his failed spells at United and in Spain.
A statement from the Wearside club read: “David advised the chairman and chief executive of his decision to leave the club at a meeting in London this morning (Monday 22nd May 2017).
Speaking about the decision, chairman Ellis Short added: “I pursued the services of David Moyes for a considerable period prior to his appointment last summer, which makes the announcement of his departure difficult for everyone concerned.
“Having worked tirelessly throughout the campaign to avoid relegation from the Premier League, David has chosen to leave the club without compensation, which is testament to his character.
“In the days ahead we will take some time for reflection, and then focus on recruitment and pre-season as we prepare for our Championship campaign. We wish David well in the future.”
Moyes said: “I would like to thank Ellis Short and the Board for giving me the opportunity to manage Sunderland and the fans for always being so passionately supportive of their club.
“I wish the players and my successor well in their efforts towards promotion back to the Premier League.”