Donald Nichols, center, forecast war on the Korean Peninsula in 1950, but he was ignored. (Lindsay Morgan)

Mary Louise Kelly is NPR’s National Security correspondent. Her latest novel is “The Bullet.”

Last month, eight days after North Korea conducted its latest and most powerful nuclear test, CIA Director Mike Pompeo conceded that deciphering that country's intentions is an "incredibly difficult intelligence problem."

The crux of that problem?

Trying to predict the next move of a foreign leader “who makes decisions, at the very least, in a very, very tight circle, in which we have limited access,” Pompeo said in an interview with Fox News.

Pompeo’s predicament may be worrying, but it is not new. America’s intelligence and political leaders have never known as much as they would like about what their North Korean counterparts are up to. There’s no U.S. Embassy in Pyongyang, thus nowhere to base a traditional CIA station. Few Western business travelers and even fewer tourists flowing in and out mean sparse opportunities for American intelligence officers to blend in undetected. Donald Gregg, a CIA veteran who spent much of his career trying to penetrate North Korea, once told me he considers that country “the longest-running failure in the history of American espionage.”

“King of Spies,” by Blaine Harden (Viking)

“King of Spies: The Dark Reign of America’s Spymaster in Korea” presents us with a possible exception to that history. It is the story of Donald Nichols, a seventh-grade dropout who rose to command a spy empire from Seoul at the dawn of the Cold War. Or, as Blaine Harden puts it in his new biography of Nichols, it’s the story of a U.S. Army motor pool mechanic who metamorphosed into a black-ops phenomenon.

As Harden tells it, Nichols’s life amounts to a case study in the value of being in the right place at the right time. Nichols was overweight, under-educated and 23 years old when he reported for duty in Seoul in 1946. But within weeks he forged a friendship with Syngman Rhee, a Korean politician who had been living in exile in the United States and who had just returned to Seoul, with ambitions to become president.

Exactly when and where these two first met is lost to history. “They were an unlikely pair—the porcine young American agent and the bony old Korean politician,” Harden notes. But the bond proved durable. For Rhee, the young American provided a back channel to the U.S. military. For Nichols, the soon-to-be president opened doors to a network of Korean generals and spies.

Nichols began feeding detailed intelligence cables to Washington, noting the locations of North Korea’s tanks and troops. He began sneaking into North Korea in disguise, first pretending to be a train commander and later moving in fabric-covered L-4 spotter planes flown by South Korean pilots.

In a report dated Feb. 11, 1950, Nichols came to this conclusion: War on the Korean Peninsula was inevitable.

“The cable rang alarm bells among the Joint Chiefs of Staff and at the State Department,” Harden writes. A meeting was convened. “Its focus: Who the hell is Donald Nichols and does he know what he is talking about?”

He did. Four months later — June 25, 1950 — the Korean People’s Army began firing across the 38th parallel. Nichols continued to build his network in the months that followed, as Seoul fell, was recaptured and fell again.

By early 1951, no one seems to have been supervising him. “Nichols was given open-ended authority to gather intelligence and conduct sabotage, demolition, and guerrilla operations behind enemy lines,” Harden writes. How open-ended? At its peak, in 1952, Nichols’s intelligence unit (official name: Special Activities Unit #1) controlled bases in South Korea and on islands along the east and west coasts of North Korea. More than 900 Korean agents reported to him, along with 52 U.S. Air Force officers and airmen. (Initially part of the Army, the Air Force spun off to form a separate branch of the military in 1947).

The war years, Harden writes, proved “the most magnificent season of [Nichols’s] life.” He was out-hustling the CIA. He was operating almost entirely outside the traditional military chain of command. He was not yet 30.

Nichols’s spy career unraveled as improbably as it began. The armistice was signed in July 1953. The generals who had protected Nichols moved on; the Air Force reorganized and eliminated his covert unit.

Quite what was happening inside Nichols’s head around this period is a question Harden poses and never really succeeds at answering. He chronicles rumors of strange behavior, along with a 1957 disciplinary report charging that Nichols mistreated his men, but nothing that satisfactorily explains how he came to be spirited off base in a straitjacket later that year. He was shipped home and forced to undergo months of electroshock treatment at a military hospital in Florida.

After his discharge, Nichols fell into a bizarro spiral of gluttony, stashing bricks of cash in the freezer and running from the law. On Jan. 3, 1967, he was arrested, 40 miles north of the Mexican border, on warrants for statutory rape and indecent assault on a child. A jury found him not guilty. But Nichols’s history of predatory behavior caught up with him 20 years later, when he was again arrested, charged with two felony counts of lewd and lascivious behavior, fined, and sentenced to a kind of house arrest. He died in a Veterans Affairs hospital in Tuscaloosa, Ala., in 1992, at the age of 69.

Harden admits that the full story of Nichols’s rise and ruin may never be told. Central characters are long dead; key documents have gone missing or remain classified. But the book is still a good yarn and a timely one — appearing as Americans are once again pondering the possibility of war with North Korea, and once again wondering how much the United States really knows about its adversary in Pyongyang.

Nichols was military intelligence, not CIA. Whatever his personal flaws, he appears to have been an excellent spy — which makes it all the more puzzling that his cables detailing North Korea’s march toward war went unheeded back in Washington.

Harden reminds us that President Harry Truman was infuriated by what he considered the failure of his intelligence chiefs to provide clear warning before the invasion. He fired his CIA director, named a new one in the summer of 1950, and set about purging and reorganizing U.S. intelligence operations. That’s a chain of events that today’s spymasters will be keen not to see repeated, as yet another American president squares off against a dictator named Kim.

King of Spies

By Blaine Harden

Viking. 260 pp. $27