The left-leaning Democratic Party of Korea candidate told cheering supporters in Seoul that he would unite the divided country and govern for all – even those who did not support him.
“I will be president for all South Koreans…this is a great victory of great people who stayed with me to create a country of justice… where rules and commonsense prevail,” he said.
The victory rally took place in Gwanghwamun Square, where vast crowds gathered over several months earlier this year demanding the removal of his predecessor Park Geun-Hye, who was sacked in Marchover a huge corruption scandal.
She is now in custody awaiting trial.
Mr Moon’s victory will, his supporters hope, usher in a new era of clean politics in a country where government is often seen as being too close to big business.
The former human rights lawyer’s win sets up the country’s first liberal rule in a decade and could change its approach towards its maligned communist neighbour North Korea and also its relationship with the US, which has 28,500 troops in South Korea.
Mr Moon, 64, has said Seoul must “take the lead on matters in the Korean Peninsula” and that South Koreans should not “take the back seat” in discussions.
He has said he wants to review the deployment of an advanced US missile defence system in South Korea and would be willing to meet North Korean leader Kim Jong-Un.
Pyongyang has carried out two nuclear tests and a number of missile launches this year and Washington’s threat of military action has increased fears in the region.
For many voters, however, the North Korean issue was not as important as the slowing economy, unemployment, corruption and air pollution from China, the country’s main trading partner.
South Korea developed rapidly between the 1970s and 1990s but its economy has slowed since then and unemployment for the under 30s is at a record 10%.
The scandal surrounding former president Ms Park highlighted widening inequality and the corrupt ties between regulators and powerful companies, a relationship many of the candidates had vowed to reform.