Charles Robert Jenkins, an Army sergeant who became a Cold War enigma after he defected to North Korea in 1965 and was kept there for nearly 40 years, died on Monday in Japan. He was 77.

His death was reported by the Kyodo News agency, which said the cause was not yet known.

Mr. Jenkins — who was born in Rich Square, N.C., on Feb. 18, 1940 — was patrolling the demilitarized zone that separates North and South Korea when, drunk after 10 beers, he walked into the North in 1965 to avoid facing combat duty in Vietnam.

He quickly realized he had made a terrible mistake. He spent years held with other American defectors, forced to read the works of North Korean leaders for hours on end and suffering from hunger and beatings.

Little was known about Mr. Jenkins’s experiences until he emerged from North Korea in 2004. He was allowed to leave to rejoin his wife, Hitomi Soga, a Japanese woman who had been kidnapped by North Korea.