On a brief trip to the heavily mined area that for 60 years has been a buffer between the Koreas, Carter and South Korean Defence Minister Han Min-Koo stood atop a hill known as Observation Post Ouellette - the closest post to the demarcation line between the two nations.
Carter later said the United States remains committed to the six-party talks process that seeks the denuclearisation of the peninsula.
North Korea has carried out three nuclear tests and has explicitly indicated its intention to carry out a fourth.
It abandoned the six-party talks, which also grouped South Korea, China, Russia, the US and Japan, in April 2009.
More From This Section
"We continue to call on North Korea to maintain peace and stability on the peninsula, avoid provocations, avoid adding to tensions on the peninsula and to take the steps that are called for in the six-party talks to denuclearise the peninsula," the Pentagon chief said.
He then went to the nearby Joint Security Area, where soldiers from either side of the border stand facing each other only yards apart.
At one point, a pair of North Korean soldiers marched to within a short distance of their side of the border and made a show of photographing visitors across the way.
"Being here shows you up close just how dangerous this part of the world is," Carter said. "That's why our alliance with South Korea is iron-clad and strong."
In the 62 years since an armistice was signed in the 1950-53 Korean War, numerous incidents and clashes - most instigated by North Korea - have threatened the official ceasefire.