The declaration included promises to pursue phased arms reduction, cease hostile acts, transform their fortified border into a peace zone and seek multilateral talks with other countries including the United States.
"The two leaders declare before our people of 80 million and the entire world there will be no more war on the Korean peninsula and a new age of peace has begun," the declaration said.
South Korean President Moon Jae-in agreed to visit the North Korean capital of Pyongyang this year, they said.
Earlier, North Korea's Kim Jong-un became the first North Korean leader since the 1950-53 Korean War to set foot in South Korea after shaking hands with his counterpart over a concrete curb marking the border in the heavily fortified demilitarised zone.
Source: Korea Summit Press Pool
Scenes of Moon and Kim joking and walking together marked a striking contrast to last year's barrage of North Korean missile tests and its largest ever nuclear test that led to sweeping international sanctions and fears of war.
Their meeting comes weeks before Kim is due to meet US President Donald Trump in what would be the first ever meeting between sitting leaders of the two countries.
Trump welcomed the Korean talks.
"After a furious year of missile launches and Nuclear testing, a historic meeting between North and South Korea is now taking place. Good things are happening, but only time will tell!" he said on Twitter.
He later added: "KOREAN WAR TO END! The United States, and all of its GREAT people, should be very proud of what is now taking place in Korea!"
China welcomed the leaders' statement and said it was willing to keep playing a proactive role in promoting political solutions on the peninsula.
Japanese Prime Minister Shinzo Abe also welcomed the summit and said he expected North Korea to take concrete steps to carry out its promises.
Global markets were lifted by hopes the summit would pave the way for the end of conflict on the Korean peninsula. Shares in Seoul briefly rose more than 1 per cent to a one-month high and Japan's Nikkei share average also gained.
As part of efforts to reduce tension, the two sides agreed to open a liaison office, stop propaganda broadcasts and leaflet drops along the border and allow Korean families divided by the border to meet.
Days before the summit, Kim said North Korea would suspend nuclear and long-range missile tests and dismantle its only known nuclear test site.
But there has been widespread scepticism about whether Kim is ready to abandon the nuclear arsenal his country has developed for decades, justifying it as a necessary deterrent against US invasion.
Kim crosses border
Earlier, the two leaders shook hands over the Military Demarcation Line that divides their countries, in a gesture laden with symbolism.
"I am happy to meet you," a smiling Moon told Kim before the visitor stepped over the concrete blocks, making him the first North Korean leader to set foot in the South since the Korean War ended in an armistice 65 years ago.
At Kim's impromptu invitation the two men briefly crossed hand-in-hand into the North before walking to the Peace House building on the southern side of the truce village of Panmunjom for the summit - only the third of its kind since hostilities ceased in 1953.
Kim was "flooded with emotion", he told Moon as the meeting began.
"I came here determined to send a starting signal at the threshold of a new history," he said, promising a "frank, serious and honest mindset".
He also urged "candid talks for good results" and said of the talks, "this is a starting point for us, I believe we'll make a new beginning".
With the North's atomic arsenal high on the agenda, Moon responded that he hoped they would reach "a bold agreement so that we may give a big gift to the whole Korean people and the people who want peace".
Kim was flanked by his sister and close adviser Kim Yo-jong and the North's head of inter-Korean relations, while Moon was accompanied by his spy chief and chief of staff.
AP reports Kim told Moon he "won't interrupt your early morning sleep anymore," referring to missile tests. Moon also suggested more summits, as Kim offered to visit the South Korean presidential mansion.
During the meeting, the leaders discussed denuclearisation and a permanent peace on the peninsula, Moon's spokesman said.
"The two leaders had a sincere and frank dialogue over the denuclearisation and the establishment of permanent peace of the Korean peninsula and development of inter-Korea ties," said Yoon Young-chan.
Last year Pyongyang carried out its sixth nuclear blast, by far its most powerful to date, and launched missiles capable of reaching the US mainland.
Its actions sent tensions soaring as Kim and Trump traded personal insults and threats of war.
Moon seized on the South's Winter Olympics as an opportunity to broker dialogue between them, and has said his meeting with Kim will serve to set up the summit between Pyongyang and Washington.
The White House said in a statement that it hoped the summit would it would "achieve progress toward a future of peace and prosperity for the entire Korean Peninsula".
Trump has demanded the North give up its weapons, and Washington is pressing for it to do so in a complete, verifiable and irreversible way.