The vote was the culmination of a frenzied two-month race set up by the scandal that ousted Park-Geun-hye, now jailed while awaiting trial on corruption charges.
"I will be president for all South Koreans", he told cheering supporters on Gwanghwamun Square in Seoul, where vast crowds gathered over several months to demand the removal of his predecessor over a huge corruption scandal.
"If the outcome of the exit poll is true, I will be happy to have rebuilt the party that had collapsed", Hong said.
Nilsson-Wright said Moon appealed to a scandal-weary electorate as a clean politician who could reunite the country following the drawn-out Park scandal, which has seen the former president accused of taking or demanding $52 million in bribes from big businesses. Constitutional reform is needed to end the country's imperial presidency and return power to the National Assembly. Mr Moon had a relatively low share of the total vote - 41.4% according to an exit poll - but there were many more major candidates than in 2012, when Ms Park won 51.5%, beating Mr Moon by about a million votes.
The victor will be sworn in after the National Election Commission confirms the result Wednesday. In 2004, when Mr Moon was serving in the Roh administration that sought rapprochement with the North, he accompanied his mother to a reunion of families separated by the war and met his aunt for the first time in about 50 years. A plurality is enough for victory. Ahn said he would "humbly accept" the result.
To address a bleak job market for young people, Moon has pledged to spend $3.7 billion annually to create 810,000 public sector jobs over the next five years, including bureaucrats, social workers, teachers, police officers and firefighters.
He is likely to quickly name a prime minister, who will need parliamentary approval.
Moon has criticised the two former conservative governments for failing to stop North Korea's weapons development.
But some still question the accuracy of the exit polls. Park sympathizers later staged their own rallies.
Hong and Ahn were expected to garner 23.3 percent and 21.8 percent, respectively, according to the exit poll, which had a margin of error of 0.8 percentage points.
Moon has advocated dialog with North Korean leader Kim Jong Un, in stark contrast to Park's approach of tough sanctions and aggressive rhetoric.
Moon, whose campaign promises include a "National Interest First" policy, has struck a chord with people who want the country to stand up to powerful allies and neighbors.
Such animation is a big part of election day TV in South Korea. Moon later became a human rights lawyer and worked for late liberal President Roh Moo-hyun. The nuclear issue is now central to inter-Korean relations. "It would take months for these tensions to sort themselves out, especially if Trump publicly criticizes the new South Korean president or penalizes Seoul, perhaps through trade measures", wrote Scott Seaman, director of Asia at think tank Eurasia Group, in a note to clients.
Moon Jae-In has claimed victory in the South Korean presidential election.
"Still, Moon is expected to engage in discussions, which could improve North-South relations".
During the campaign, Moon was critical of the deployment of the US Terminal High Altitude Area Defence (Thaad) system, which was installed to combat the growing threat of North Korea but has angered China. Pyongyang carried out a fifth test in September and is believed ready for another.
"We look forward to working with president-elect Moon to continue to strengthen the alliance between the United States and the Republic of Korea and to deepen the enduring friendship and partnership between our two countries", White House press secretary Sean Spicer said in a statement.
When he last served in government, in the early 2000s, South Korea had a "Sunshine Policy" championed by the late President Kim Dae-Jung which favored engagement with North Korea.