Throughout the 1970s, Victor Sheymov rose quickly through the hierarchy of the KGB, the spy agency of the Soviet Union. He was assigned to the Eighth Chief Directorate, perhaps the KGB’s most secretive unit, which handled communications, ciphers and codes.

By the time he was 32, Mr. Sheymov had reached the rank of major and was in charge of monitoring the KGB’s flow of information from around the world. But he was growing increasingly disenchanted with his employers and with life under the Communist regime, especially after suspecting the KGB of killing one of his friends, who had questioned the Soviet way of life.

At great risk, Mr. Sheymov decided to reach out to U.S. intelligence officers, finally making a daring escape across the border with his wife and daughter in 1980. It was the CIA’s first successful extraction — or exfiltration, as the agency calls it — of a defector from Soviet soil, and it turned out to be one of the most significant defections of the Cold War.

Mr. Sheymov, who spent the rest of his life in the United States, died Oct. 18 at his home in Vienna, Va. He was 73.

His wife, Olga Sheymov, confirmed the death, which has not previously been reported. The cause was complications from pulmonary disease.

After he was brought to the United States, Mr. Sheymov spent a year debriefing intelligence officials about the KGB’s worldwide cryptological network and other secrets.

“My goal was to inflict as much damage on the communist system as I possibly could,” he told The Washington Post in 1990, when he went public after 10 years in hiding. “The peculiar thing about me was that I was in the inner sanctum of the KGB, so I knew the whole system, including the cipher system.”

Among other things, Mr. Sheymov disclosed that the KGB hatched a plot to kill the Polish-born Pope John Paul II, who was shot and wounded by a Turkish assailant in 1981.

“The task was to find out how to get physically close to the pope,” Mr. Sheymov said at a 1990 Washington news conference. “In the KGB slang, it was clearly understood that when you say ‘physically close,’ there was only one reason to get close.”

He revealed that the KGB assassinated Afghan President Hafizullah Amin in 1979. He said two members of the U.S. State Department were spying for the KGB, and that he knew of at least one mole in the CIA.

He also warned that the U.S. Embassy in Moscow, built by Soviet workers in the early 1980s, would have so many bugs and listening devices that “you won’t have a single secret in the building.” Several years later, the building was razed, and a new embassy was built by U.S. construction crews.

Mr. Sheymov received a medal from the CIA and was praised by the federal government for his “valuable contribution to our country and national security.”

Victor Ivanovich Sheymov was born May 9, 1946, in Moscow. His father was an engineer, his mother a cardiologist.

He graduated from Bauman Moscow State Technical University, an elite science and engineering college, where he was also a standout athlete. His wife said he was a boxer and skier and held the school record in the 100-meter dash for more than 20 years.

Mr. Sheymov excelled in mathematics and studied in a program specializing in missile and spacecraft design before joining the KGB in 1971. In Beijing, he solved a long-standing mystery at the Soviet Embassy, concluding that when the building was constructed in the 1950s, the Chinese had installed hidden acoustic conduits that could transmit sound without electronic amplification.

He was promoted to a sensitive job in the KGB’s top-secret communications and coding branch, helped prepare daily briefings for members of the Politburo and was part of the spy agency’s inner circle.

“You begin to see independent information available to a few ‘trusted’ people that contradicts what you were taught before,” he told The Post in 1990. “You are in a position to see what the KGB does. It is supposed to defend the Soviet people, but it doesn’t. It works against them and the whole world.”

When a friend (and fellow KGB officer) was killed after voicing dissident views, Mr. Sheymov sought to flee the Soviet Union and take its secrets with him.

It turned out to be harder to make a connection with U.S. intelligence officers than he thought. He carried a note reading, “Hello, I am a KGB officer with access to highly sensitive information,” but never met anyone he could give it to.

He tried to have a minor crash with a U.S. diplomatic car, only to have the driver make an evasive move to avoid the collision. Finally, while on a KGB assignment in Poland, Mr. Sheymov walked to the U.S. Embassy in Warsaw.

“Are you a cipher clerk?” he was asked.

“No, I am responsible for the security of the KGB cipher communications abroad,” Mr. Sheymov replied.

“The Americans were dumbstruck,” Post journalist David E. Hoffman wrote in his 2015 book, “The Billion Dollar Spy.” “A man with the keys to the kingdom, the ultrasecret codes to Soviet communications, was volunteering to defect.”

In Moscow, the CIA assigned Mr. Sheymov the code name of “CKUTOPIA.” His CIA handler, David Rolph, gave him a miniature camera and told him, according to Hoffman’s book: “Photograph the most highly classified papers you have. Don’t take chances with other people around. But you have to prove to us that you are who you say you are.”

The pictures proved Mr. Sheymov’s credibility. He told Rolph that he wanted to flee the Soviet Union but would not leave without his wife and 5-year-old daughter.

Mr. Sheymov received his instructions in a letter written in invisible ink. (The writing appeared when the page was moistened.) When he was ready to leave Moscow, he was told, he should mark the letter “V” on a plaster pillar outside a bakery. He borrowed a waterproof marker from another KGB office and scrawled the “V” with his back to the pillar.

It took more than two months before the escape plan, detailed in Hoffman’s book, was ready. The CIA gave Mr. Sheymov five varieties of sedatives to determine which would be the safest for his daughter, to keep her asleep as they were smuggled out of the country.

On May 16, 1980, the Sheymovs sneaked away from their apartment, leaving teacups on the table, an open newspaper and an unmade bed. Clothes and family heirlooms were in their usual places, so as not to arouse suspicion.

“I didn’t leave a goodbye note,” Mr. Sheymov wryly said in a 1990 interview.

They took two trains, fearing that anyone they met could turn them in, before arriving in a remote town. They climbed into a nondescript car, Mr. Sheymov wrote in his 1993 book, “Tower of Secrets,” driven by a man with a Polish accent.

Mr. Sheymov concealed himself and his sedated daughter, Elena, in a hidden compartment between the car’s trunk and back seat. His wife, Olga, sat in the front seat, posing as the driver’s girlfriend.

At one checkpoint, a guard demanded that the driver give him the Billy Joel tape he was playing in the car.

The exact location of the border crossing has never been divulged: Hoffman suggested in his book that it may have been Finland. Olga Sheymov said in an interview that it was in the Carpathian Mountains, a range that stretches more than 900 miles across several countries, most of which were part of the Soviet bloc.

Once they were across the border, the Sheymovs were taken to a safe house, then flown to the United States. They had no further contact with their families until after the collapse of communism a decade later. Mr. Sheymov became a U.S. citizen and was reunited with his parents and a sister in the early 1990s, when they resettled in Northern Virginia.

Over the years, Mr. Sheymov maintained that he had been promised $1 million for defecting and free lifetime health care. The CIA disputed that claim. After hiring former CIA director R. James Woolsey to represent him, he reached a settlement with the CIA in 1999.

Along with “Tower of Secrets,” Mr. Sheymov wrote three other books, including a novel and technical works on technology and security, and launched a cybersecurity firm, Invicta Networks. He had several patents for inventions related to software protection.

Survivors include his wife of 45 years, the former Olga Voight, an artist and television producer, of Vienna; a daughter; a sister; and a granddaughter.

During his final days with the KGB in Moscow, Mr. Sheymov said he wasn’t sure whether he was being helped by the CIA or duped by the Soviet Union.

“The one thing that proved to me you were CIA and not KGB,” he told Rolph, according to Hoffman’s book, “is when you gave me those medicines to test on my daughter. Because the KGB is heartless. They would have given me one pill and said, do it. I knew I was working with a humane organization when you gave me five medicines.”