The elder Mr. Kim, who ruled North Korea from 1994 until his death at the end of 2011, had three wives and at least six children. His first wife delivered a son in 1971 but fell out of favor and died in exile in Moscow. His second wife gave birth to two daughters but no son. His third wife, Ko Yong-hui, a Japanese-born Korean singer and dancer, had two sons and a daughter.

Despite his mother’s departure, the eldest son, Kim Jong-nam, was widely considered the heir apparent until 2001, when he was caught attempting to visit Tokyo Disneyland on a false passport. He later appeared to go into exile, living in Macau and surfacing occasionally with mild criticism of the regime, before his assassination in Malaysia in February.

Image In a 1981 family portrait, Kim Jong-il with his oldest son, Kim Jong-nam, front right; his sister-in-law Sung Hye-rang, left rear; and her daughter, Lee Nam-ok, and son, Lee Il-nam. Credit... Agence France-Presse — Getty Images

Kim Jong-il’s second son, Kim Jong-chol, was seen at an Eric Clapton concert in London in 2015, but little else is known about him and it is unclear why he was passed over for succession. One of the only clues comes from Kenji Fujimoto, the Kim family’s former sushi chef, who wrote in a memoir published in 2003 after he escaped North Korea in 2001 that the elder Mr. Kim considered the child too “effeminate.”

But Kim Jong-il adored his third son, Kim Jong-un, and saw his own domineering attitude and other leadership qualities in the boy at an early age, according to Mr. Fujimoto, who was one of the few to predict Kim Jong-un’s rise to power.

After a basketball game, for example, Kim Jong-chol would leave the court immediately but Kim Jong-un would linger and gather his teammates for postgame analysis, the chef wrote. Mr. Fujimoto also recalled how Kim Jong-un sometimes hurled board-game pieces at his brother when he was losing.

On his eighth birthday, Kim Jong-un was given a general’s uniform as a gift, and from then on, generals paid their respects to him by bowing before him, according to his aunt, Ko Yong-suk, who defected to the United States in 1998.