Moon was favored in opinion surveys after the huge corruption scandal that led to President Park Geun-hye's ousting complicated politics for the conservatives.
"It was a very short election period, but I did my best to explain my vision, policy and values", he said. He said he and his party "invested all our efforts with a sense of desperation, but we also felt a great desire by people to build a country we can be proud of again".
Thirteen candidates are vying for the top elected office, but many believe the election is, in reality, a three-way race between Moon Jae-in of the liberal Democratic Party, Hong Joon-pyo of the conservative Liberty Korea Party and Ahn Cheol-soo of the center-left People's Party. When the liberals were last in charge in Seoul, Moon served as chief of staff for then President Roh Moo-hyun.
Voters said corruption and the economy were major issues going into the election, followed by North Korea.
A May 3 poll from Gallup had Moon ahead at 38% with Ahn, the next closest challenger, at 20%.
Moon told reporters after casting his ballot he had "given the campaign his all", and urged South Koreans to vote. At the close of polling, an estimated 75% of South Koreans had cast their votes, according to the National Election Commission, though that figure is expected to change.
This forgoes the usual two-month transition because Tuesday's vote is a by-election to choose a successor to Park. Her term was originally to end in February 2018. "South Korean halt of military exercises - something the previous South Korean leaders have failed to do in the past 10 years", a commentary in China's official Xinhua news agency said on Tuesday. He said the most important issues for him in the election were "the job market for young people and economic development".
Others were more concerned about the growing threats posed by North Korea's nuclear weapons and missiles and fears over Seoul losing its voice in worldwide efforts to deal with its belligerent rival.
"We must overcome this with united power", he said. "This is not the time to keep our eyes just on domestic issues - we need to think about the nation's long-term future and peace".
Park, South Korea's first female president, is jailed at a detention facility near Seoul and awaits a criminal trial set to start later this month.
Moon, who lost the 2012 election to Park by a million votes, frequently appeared at anti-Park rallies and the corruption scandal boosted his push to re-establish liberal rule.
Frustration over widening inequality in wealth and opportunities fuelled anger over Park's scandal, which exposed the cosy and corrupt ties between regulators and powerful family-oriented conglomerates, known as chaebols, that have endured for decades.
Trump has sent warships and submarines to the region in a show of force, and the administration says it will try to work with its allies and China to pressure North Korean leader Kim Jong Un into abandoning his country's nuclear and missile programs.
Mr Moon's parents actually fled their homes in the north during the Korean War and advocates for a less hard line approach than the conservative party, which has allowed the USA to install the Terminal High Altitude Area Defence (THAAD) missile system and readied the military for a conflict.
Another issue is relations with Beijing, which imposed a series of measures seen as economic retaliation over the deployment of a USA anti-missile system, THAAD, in the South.
Moon's approach toward North Korea is widely perceived to have been influenced by his time serving in the South Korean government in the early 2000s, when Seoul pursued the so-called "Sunshine" policy.
Moon also says he would be willing to visit Pyongyang to meet Kim, and advocates resumption of some of the inter-Korean projects shuttered by his predecessors, including the Kaesong joint industrial zone.
Voters in their 40s and 50s tend to support Mr Moon on this stance because they were coming of age in the 1980s as South Korea was democratising and "holding protests against past authoritarian South Korean governments", Ms Collins said.
Last month, even before Trump boosted ire in the country, South Korean protesters had already begun demonstrating against what they saw as a USA rush to get THAAD deployed before the election.