The winner will take office tomorrow, without the usual two-month waiting period.
"This is the last challenge of my life and I'm confident. I will muster all my efforts to be the president of all South Koreans," Moon told supporters as he criss-crossed the country yesterday, the last day of campaigning.
Moon had a strong lead in opinion surveys going into the election, regularly scoring above 40 per cent while his two closest rivals struggled to get half that. Turnout for early voting was high: more than a quarter of the electorate had cast their ballots before polling day, a phenomenon expected to help Moon.
"When I look at his path in life, I think he is the best to represent us," said Kim Ji Hyun, a 31-year-old who who attended a recent Moon rally with her dog. "He's very clean and he operates according to his principles. I think he will help South Korea to have its own voice."
He is expected to name a new prime minister immediately and start the process of appointing a cabinet, but Moon's party does not control the National Assembly, potentially complicating the confirmation process.
Supporters at his rallies have lauded his track record after the corruption scandal involving Park, who is now on trial for bribery and coercion. A human rights lawyer who has been in politics for only five years, the 64-year-old Moon is not a natural politician but one who finds himself in this position through fate. Indeed, his memoir is called "Destiny".
Moon was born on the island of Geoje, off the coast from Busan, in 1953 to parents who had escaped from the North to the South during the Korean War.
Like many of his generation, he grew up poor but was able to attend a university. He became a student leader protesting against the dictatorial government led by former general Park Chung Hee, the father of the impeached president. He was expelled and imprisoned.
But after completing his military service, he returned to his studies and passed the bar exam in 1980.
It was at this time that he met the like-minded Roh Moo Hyun, and the two of them set up a law office handling labour disputes and human rights cases in Busan.
Song Byung Gon, who worked as a paralegal in Roh and Moon's law office until 2002, described the candidate as "prudent and gentle".
"He was calm and quiet and I don't remember seeing him get angry at work," Song recalled. "He didn't make jokes in the office, either."
When Roh became South Korean President in 2003, he took Moon with him to Seoul, putting him in a series of senior positions, including chief of staff.
During that period, Roh pushed ahead with the inter-Korean engagement started by his liberal predecessor, Kim Dae Jung, and known as the "sunshine policy" - the idea being that if they could shine a little light into North Korea, they could lessen the divisions between the two countries.
Roh committed suicide in 2009 after becoming involved in a bribery scandal, and Moon won a parliamentary seat in Busan three years later. Within nine months, he was on the presidential ticket challenging Park.
Although he lost, he remained on the political scene and won the Democratic nomination after Park's ouster in March.
As a candidate, Moon has been espousing progressive policies on the economy, promising to put together a huge stimulus package and to lessen the disparity between rich and poor.
Recent polls have put economic revival and cleaning up corruption at the top of voters' priority lists for this election. Every generation of voter - from young graduates struggling to find jobs to baby boomers wondering how to support their elderly parents - is unhappy.
Moon's core policy proposals include job creation, with the specific pledge to create 810,000 public sector positions; reducing long working hours; improving transparency in government appointments; and strengthening regulations on the huge conglomerates that dominate corporate South Korea and have been implicated in recent corruption scandals.
But on social issues, he embodies Korean conservatism. During a televised debate, the leading conservative candidate asked him if he opposed homosexuality and same-sex marriage, and Moon said he did. This pronouncement was sharply criticised by LGBT groups but did not cost Moon politically - in fact, to support gay rights in South Korea would be politically damaging, even in 2017.
While domestic issues have dominated this election campaign, foreign affairs is much higher up the agenda than usual, thanks largely to Trump's election and the stance he has taken on both North and South Korea.
In a surprisingly detailed foreign policy statement released at the end of last month, Moon stated: "Nothing is more dangerous than letting others decide our fate."
He has vowed to review the Park Government's decision to host a controversial American missile defence system and to resume economic cooperation with North Korea at a time when sanctions are all the rage.
Moon has said he would seek to re-open the South Korean-run factory park at Kaesong, on the North Korean side of the border that Park closed last year, saying it was violating international sanctions and channelling money to the Kim regime.
The possibility of a return to the sunshine policy - formulated in an era when North Korea had not conducted a single nuclear test - has raised concerns in Washington. .
But the differences between Trump and Moon could in fact be helpful, said Ralph Cossa, president of the Centre for Strategic and International Studies' Pacific Forum.
"You couldn't have asked for stranger bedfellows than Roh Moo Hyun and George W. Bush, but the alliance survived and things moved ahead," said Cossa. "In fact, this could be good news because it will force both of them [Moon and Trump] towards a middle path."
THE ELECTION
- Voting stations opened at 6 am (9am NZT) and are set to close at 8 pm (11pm).
- South Korean TV stations plan to release the results of their joint exit polls soon after the vote ends
- They are expected to predict a winner before midnight (3am).
- The winning candidate will be officially sworn in after the National Election Commission ends the vote count and confirms the winner tomorrow.
- This forgoes the usual two-month transition because today's vote is a byelection to choose a successor to Park Geun Hye. Her term was originally to end in February 2018.
- The new leader will still serve out a full, single five-year term.
-AP
THE OTHER CONTENDERS
AN HEE JUNG
A youthful-looking provincial governor, An, 51, surged to second place in opinion polls after former Un chief Ban Ki Moon dropped out of the race. An was an aide to former President Roh Moo Hyun, a liberal, when Moon was Roh's chief of staff. He is a two-term governor of rural South Chungcheong province. Some supporters have nicknamed him the "Obama of South Korea".
An came second in the latest poll, with support of 17 per cent of the 1005 people questioned.
An also favours more engagement with North Korea but has said the THAAD deal should be respected as South Korea and the United States have agreed to deploy it. He has called for a fair, transparent market economy.
AHN CHEOL SOO
Ahn, 55, is a former doctor and computer businessman.
Ahn's popularity has waned in recent months after stepping down as co-chair of the new opposition People's Party, after it became embroiled in a kickback scandal over advertising funds. Ahn was not implicated. He is a member of parliament.
He got the support of 9 per cent of respondents in the latest poll.
He is open to dialogue on North Korea, though has also advocated a tough line. He says the THAAD system must be deployed and South Korea must make greater efforts to convince China it is not aimed at them. On the economy, he advocates the expansion of small- and medium-sized enterprises.
HWANG KYO AHN
Prime Minister Hwang, 59, became acting President after Parliament voted to impeach park on December 9. Hwang was a state prosecutor for nearly 30 years before launching a career in politics and is considered a loyalist in Park's cabinet. He has not said if he will run for president but has, nevertheless, emerged as a top conservative candidate.
Hwang got 9 per cent in a latest poll.
Hwang reflects Park's tough line on North Korea and whole-hearted support for THAAD. His economic thinking is conservative.
LEE JAE MYEONG
Lee, the 52-year-old Mayor of Seongnam, a city southeast of Seoul, has surged in opinion polls as an outspoken critic of Park since the scandal that led to her impeachment erupted.
A member of the main opposition Democratic Party, Lee has said he wants to be the South Korean Bernie Sanders, after the US Democratic Party insurgent who ran against Hillary Clinton.
He got the support of 8 per cent in the latest poll.
Lee has billed himself as the inheritor of the "Sunshine policy" of engaging with North Korea. He recently told Chinese media the THAAD deployment should be called off. He is well known for his staunch criticism of the chaebol.
- Reuters, AAP