"The government will prevent a war at all cost. We must peacefully resolve the North Korean nuclear issue no matter how many ups and downs there are," Moon said in a ceremony marking the 72nd anniversary of the country's liberation from the 1910-1945 Japanese colonial rule.
"The government will further step up its diplomatic efforts to make sure the international community's principle of peaceful resolution of the North Korean nuclear issue will not waiver," he added.
Moon's remarks come amid escalating tension between the United States and the North that many here believe may lead to the outbreak of armed conflict if not an all-out war.
Pyongyang says it is considering staging a missile exercise around the U.S.-controlled island of Guam that is viewed as a clear and direct threat to the United States.
Washington has warned that it can move to counter Pyongyang's threats militarily, with U.S. President Donald Trump going a step further saying the option to use force is "locked and loaded" and ready for implementation.
Moon apparently sought to calm both sides, saying no military action should take place without Seoul's consent.
"Military action on the Korean Peninsula can only be decided by the Republic of Korea and no one may decide to take military action without the consent of the Republic of Korea," Moon said, referring to his country by its official name.
Still, the South Korean leader said his country will also enhance its own defense capabilities to ensure peace.
"At the same time, we will keep our doors open for military dialogue to make sure the military tension between the South and the North will not worsen," the president said.
He repeated his call on the communist North to halt its provocations and return to the dialogue table.
"North Korea must remember that when it suspended its missile tests or declared a suspension to nuclear tests was when the North-South Korean relations were at their best. That was when North Korea-U.S., North Korea-Japan talks were promoted and multilateral diplomacy in the Northeast Asian region flourished," Moon said.
"The resolution of the North Korean nuclear issue must start from a nuclear freeze. North Korea must at least halt its nuclear and missile provocations before conditions for dialogue can be created," he added.
He said his country will help ensure the economic development of the North, as well as the safety of its communist regime, should the impoverished nation choose the right path.
"I once again clarify. We do not want North Korea's collapse. We will not pursue reunification by absorption nor seek any type of artificial unification."
"Should North Korea continue down this path, there will only be isolation and a dark future for the North. We, too, cannot but increase our sanctions and pressure against the North even if we do not wish to," he said.
The South Korean president again extended his invitation for the North to take part in the upcoming Winter Olympic Games to be held in South Korea's PyeongChang, calling it a "great chance for the South and the North to take a step toward peace."
He also urged other countries in Northeast Asia, including Japan, to join efforts in institutionalizing regional security and economic cooperation.
But to this end, the South Korean leader said Japan must first look squarely at the countries' shared past and admit its past wrongdoing.
"The government will expand various exchanges, including shuttle diplomacy, for the development of Korea-Japan relations. But we cannot overlook historical issues just because the future of Korea and Japan is important. Rather, the mutual trust of the two countries will only deepen when they squarely address history-related issues," the chief executive said.
Moon earlier hinted at scrapping the 2015 agreement between Seoul and Tokyo over Japan's sexual enslavement of Korean women during World War II.
The deal, signed by Seoul's former conservative administration, sought to forgive Japan for its war atrocities once and for all in exchange for a mere 10 billion yen (US$9.1 million).
"In dealing with history issues between South Korea and Japan, such as Japan's sexual slavery and forced labor of Korean people, there exists an international standard of restoring one's honor, compensation, fact-finding and a promise to prevent a recurrence of such events based on universal values of humanity and national consensus," the South Korean leader said.
"Our government will stand by these principles," he added.