Left-leaning Moon, a former human rights lawyer, backs engagement with Pyongyang in the quest for peace -- in contrast to the threatening rhetoric from the Trump administration in recent weeks.
"If needed I will fly to Washington immediately," Moon told lawmakers after taking the oath of office in Seoul's National Assembly building.
"I will also go to Beijing and Tokyo and even Pyongyang in the right circumstances."
He also begins his term facing multiple domestic challenges, including the aftermath of the huge corruption scandal that saw his conservative predecessor Park Geun-Hye impeached and swept him to power, but leaves the country bitterly divided.
More From This Section
"I will be a president to all people," Moon said, promising to "serve even those who did not support me".
"I will become a president who is at eye-level with the people," he added, saying he would talk to market traders on his way home from work.
Moon took 41.1 per cent of the vote, far ahead of Hong Joon-Pyo of Park's Liberty Korea party, on 24.0 per cent, and centrist Ahn Cheol-Soo on 21.4 per cent.
Ahead of the swearing-in, Moon met with leading lawmakers of Liberty Korea -- which advocates a hard line on the North and has repeatedly accused him of being a Pyongyang sympathiser who would "hand the whole country to the North once elected."
Since the beginning of last year the North -- which says it needs atomic weapons to defend itself against invasion -- has mounted two nuclear tests and a series of missile launches.
In recent months the Trump administration has suggested a military option is on the table, sending fears of conflict spiralling -- although the US president changed tone last week, saying he would be "honoured" to meet the North's young ruler, Kim Jong-Un.
He is also expected to name his prime minister, spy chief and presidential chief of staff Wednesday, his aides said.
Chinese President Xi Jinping congratulated Moon over his election victory, saying he would be willing to work with him on a basis of "mutual understanding and mutual respect", according to China's official Xinhua news agency.
The phrasing is Beijing's diplomatic code for acceptance of its stance.