Since taking power in 2011, Mr. Kim has executed scores of top officials, including his own uncle. He has also tested a hydrogen bomb and long-range missiles, claiming that he could hit the mainland United States with nuclear warheads.

Vilified as he was, however, Mr. Kim has also shown signs of being a reformer, granting farms and factories more autonomy, allowing more markets to open, and setting off a building boom in his showcase capital, Pyongyang. He exhorts his country to follow “international development trends” and “global standards” and even admits failing to deliver on his promise that his long-suffering people would “no longer have to tighten their belts.”

“My desires were burning all the time, but I spent the past year feeling anxious and remorseful for the lack of my ability,” Mr. Kim said in a nationally broadcast speech last year, a startling admission for a member of the family that has ruled North Korea with the help of a personality cult since its founding in 1948.

After meeting him, Mr. Moon called Mr. Kim “open-minded and practical.”

Nowhere is Mr. Kim’s dilemma better seen than in his policy of “byungjin,” or parallel advance, which seeks a nuclear arsenal and economic development simultaneously. Under that policy, Mr. Kim has rapidly developed his country’s nuclear weapons and ballistic missile programs, arguing that a nuclear deterrent would make his country feel secure enough to focus on rebuilding the economy. But the world has responded by imposing crippling sanctions.

“Kim Jong-un is at a crossroads,” said Cheong Seong-chang, a senior analyst at the Sejong Institute in Seoul, South Korea’s capital. “He could advance his nuclear weapons program further and face a deeper isolation and possible economic ruin. Or he could use it as a bargaining card to win normalized ties and a peace treaty with the United States and economic recovery.”

If Mr. Kim pursues the route of economic reform, energy and transportation are the two areas where he most needs outside help. In his meeting with Mr. Moon, Mr. Kim admitted to the “embarrassing” condition of his roads and railways, South Korean officials said.