OTTAWA — Johnny X is Canada’s spy who came in from the cold.

An enigmatic secret agent, he spent a lifetime covertly battling Nazis and Communists on several continents while living under a death sentence.

Johnny X, one of his many shadowy aliases, appears only sporadically in the historical record of 20th-century espionage. And he ended his days in obscurity in Brockville, Ont., as a proud new Canadian running a shabby waterfront hotel to earn a modest retirement income.

His remarkable life, which included dangerous undercover work in wartime Canada, has eluded historians partly because espionage archives have remained largely under lock and key. But a new book for the first time lays bare the story of Johann Heinrich Amadeus de Graaf, as he was christened at his birth in 1894 in Nordenham, Germany.

“The tale you are about to read is an incredible one,” authors Gordon D. Scott and R.S. (Bob) Rose write in their introduction to Johnny: A Spy’s Life (Penn State University Press).

“It is the adventure of a man considered a hero by some and an adversary by others.”

The book is a strange hybrid of memoir and scholarship.

Scott was a boyhood neighbour of de Graaf during the Second World War, when Johnny and his wife Gerti lived briefly in Montreal’s Westmount. He was friends with the couple through his parents, who often played cards with them.

As an adult, Scott became more familiar with de Graaf’s exploits and persuaded the retired spy to record his memoirs on tape in 1975-76, five years before Johnny’s death. Scott transcribed the tapes before they were discarded, and the transcriptions form the backbone of the new book.

Rose, a multilingual scholar who teaches criminology at Northern Arizona University in Yuma, then did 14 years of fact-checking in 13 countries, painstakingly testing Johnny’s often self-serving recollections against the facts.

Britain’s Secret Intelligence Service MI6, for whom Johnny X worked as a double-agent beginning in 1933, refused to open its archives for the project. The government of Argentina, the scene of some of Johnny’s exploits, was similarly unhelpful.

Even so, Rose extracted much compelling material from the FBI, the RCMP and others to put meat on the bones of the memoir, often using freedom-of-information laws.

The result is a sweeping tale of a courageous agent who pretended to work for the Russian intelligence service, which trained him in Moscow in 1930, and even for the Nazis, while actually serving Britain and Canada. His globe-trotting operations took him to Britain, Germany, the Far East, South America and Canada.

Canadian readers will be especially drawn to the final chapters, as Johnny is hired by the RCMP to infiltrate Nazi groups in Montreal during the Second World War.

Special Agent 235, the identity assigned to him by the Mounties, successfully set himself up as an emissary of Hitler and forbade any sabotage in Canada until the Fuehrer authorized it. The order to bomb factories and other strategic assets, of course, never came.

Johnny X also played a vital role in Canada’s first double-agent case, in which a spy landed by U-boat on the Gaspe coast in 1942 was captured and forced to send controlled short-wave radio messages back to Nazi Germany. The cellar of Johnny X’s house in Westmount became the base for Operation Watchdog.

De Graaf eventually retired to Brockville, without a pension, and successfully applied for Canadian citizenship in the 1950s.

A virulent anti-Communist, he gave lectures in eastern Ontario and western Quebec on the Red menace in Canada. He often spiced up his presentations by setting off small explosions using readily available ingredients — just as Soviet agents were trained to do, he warned his spellbound audiences.

Johnny X was no saint. The book presents evidence that he killed a common-law wife partly because he couldn’t trust her to keep his secrets, and that he was anti-Semitic.

But Rose is generally laudatory: “Johnny had a big heart,” he said in an email. “He was very generous.”

“He was a calm individual under stress who could compartmentalize the evil things the British Crown asked or required him to do.”

R.S. Rose and Gordon D. Scott, Johnny: A Spy’s Life (Penn State University Press, US$45)