Egil “Bud” Krogh Jr., a lawyer and Nixon aide who co-chaired the secret White House “Plumbers” unit and was sentenced to prison after approving a break-in at the office of Pentagon Papers leaker Daniel Ellsberg’s psychiatrist, died Jan. 18 at a hospital in Washington. He was 80.

The death of Mr. Krogh, a key player in the Watergate affair that brought down Richard M. Nixon’s presidency, came two days after the impeachment trial of President Trump began in the Senate. Mr. Krogh had suffered a stroke in 2015, said his son Peter Krogh, who did not give a precise cause of death.

A former deputy assistant to the president and undersecretary of transportation, Mr. Krogh was the first member of the Nixon administration sentenced to prison for his conduct in the White House. He later called the Ellsberg episode “a meltdown in personal integrity” and spent years teaching and lecturing about ethics, atoning for his crimes and teaching others how to avoid what he described as a historic error in judgment.

“If you compromise your integrity, you allow a little piece of your soul to slip through your hands,” he wrote in a memoir, “Integrity” (2007), with his son Matthew Krogh. “Integrity, like trust, is all too easy to lose, and all too difficult to restore.”

In the eyes of Mr. Krogh and many presidential historians, the 1971 break-in at the Beverly Hills, Calif., offices of Lewis Fielding, Ellsberg’s former psychiatrist, paved the way for a more notorious burglary at the Watergate complex in Washington nearly 10 months later, when two of Mr. Krogh’s former associates helped organize a break-in at Democratic National Committee headquarters.

While the Fielding break-in was widely considered a shocking abuse of presidential power, it was all the more unexpected given the involvement of Mr. Krogh, an Eagle Scout and retired Navy communications officer who was considered “the White House Mr. Clean, so straight an arrow that his friends mockingly called him ‘Evil Krogh,’ ” wrote Bob Woodward and Carl Bernstein in their Watergate book “All the President’s Men.”

Mr. Krogh was only 29 when he joined the White House, having worked with family friend John D. Ehrlichman at a Seattle law firm. When Ehrlichman became Nixon’s White House counsel (and later domestic policy chief) after the 1968 election, Mr. Krogh followed him to Washington, where he orchestrated an impromptu meeting between Elvis Presley and the president in 1970, in addition to directing Nixon’s narcotics-control efforts and working to reduce crime in the District.

His work dramatically shifted after June 13, 1971, when the New York Times published excerpts of the Pentagon Papers, a secret history of the Vietnam War that had been leaked by Ellsberg. Its release spurred the White House to create the Special Investigations Unit, later nicknamed the “Plumbers” because they aimed to plug the leak of classified information, in addition to generating advantageous leaks of their own.

Mr. Krogh co-chaired the group with David R. Young, a National Security Council staffer, meeting in the basement of the Old Executive Office Building with E. Howard Hunt, a onetime CIA officer, and G. Gordon Liddy, an ex-FBI agent.

According to Mr. Krogh, Hunt soon proposed digging up damaging information about Ellsberg through his psychiatrist, Fielding. A proposal from Mr. Krogh and Young called for “a covert operation . . . to examine all the medical files still held by Ellsberg’s psychoanalyst.” It was approved by Ehrlichman, who added in a note that it could go ahead “if done under your assurance that it is not traceable.”

While Hunt and Liddy kept watch, a team of three burglars broke into Fielding’s office on Sept. 3, 1971, using a crowbar to open his file cabinet. They trashed the office in what Mr. Krogh described as an effort to disguise the burglary as a botched attempt to steal drugs and apparently found nothing useful. Mr. Krogh was dismissed from the Plumbers unit three months later, after he refused to back the use of a warrantless wiretap on another suspected leaker.

“In May 1973,” Mr. Krogh later wrote in his memoir, “the ice cracked open and I fell through.” With Ellsberg on trial for disclosing the Pentagon Papers, the Fielding break-in became public, and Mr. Krogh submitted an affidavit explaining his role. He was indicted in federal and state courts on burglary, conspiracy and perjury charges and pleaded not guilty before experiencing a change of heart — realizing, he later wrote, that he and his fellow Plumbers had “crossed the Rubicon into the realm of lawbreakers.”

Mr. Krogh pleaded guilty to “conspiracy against rights of citizens” (other charges were dropped) and agreed to cooperate with prosecutors in their investigation of the Watergate scandal, an affair that resulted in prison sentences for Hunt, Liddy and Ehrlichman, among others. He received a sentence of two to six years, ultimately serving 4 1 / 2 months.

“At the time, in 1971, I thought that what we were doing was dictated inescapably by the national security interests,” Mr. Krogh told the New York Times in 1992. He had since learned, he added, that “you have to remain true to your deepest sense of what is right. You have to be willing to question what you’re being asked to do. I wasn’t willing to question what I was doing.”

Egil Krogh Jr. was born in Chicago on Aug. 3, 1939. His name was pronounced “Eh-gill Krogue” (and frequently mispronounced as Eagle), and his sisters nicknamed him Buddy as a boy, leading him to go by Bud for most of his life.

His mother was a homemaker and his Norwegian immigrant father rose to became an executive at Marshall Field’s department store, leading the family to move to Portland, Ore., and eventually Seattle. Mr. Krogh studied at Principia, a Christian Science boarding school in St. Louis, and graduated in 1961 from the affiliated Principia College in nearby Elsah, Ill.

Like his father, a champion runner who served as a pacesetter for Olympic athlete Joie Ray, Mr. Krogh ran track, eventually setting a personal best mile time of 4 minutes 28 seconds. He was also an accomplished mountaineer, helping organize a 1990 “peace climb” of Mount Everest that featured climbers from the United States, Soviet Union and China; he reached 21,500 feet but did not summit.

Mr. Krogh attended business school at the University of Chicago for several weeks before dropping out and joining the Navy, serving aboard the USS Yorktown aircraft carrier during the Vietnam War. He received a law degree from the University of Washington in 1968 and joined the White House the next year.

“He would tell you he was way too young,” his son Peter said by phone. “He simply did not have the experience or knowledge to really do the things he was put in charge of doing.” Nonetheless, his personal highlights in office included spearheading the December 1970 meeting with Elvis, who had expressed support for the president’s anti-drug efforts. They discussed the difficulties of performing in Las Vegas, according to Mr. Krogh’s meeting notes, and Nixon promised that Elvis could receive a narcotics agent’s badge.

Mr. Krogh’s actions during the Watergate hearings infuriated his former mentor Ehrlichman, who later wrote in a memoir that Mr. Krogh “demonstrated such doubtful personal judgment on several occasions that it has to be said he materially contributed to the demise of the Nixon Administration.”

He was disbarred and worked for Rep. Paul N. “Pete” McCloskey Jr. (R-Calif.) before being reinstated in 1980 and returning to legal work, specializing in energy law for a Seattle law firm. By the late 1990s, he had begun offering ethics seminars, his son said; in recent years, he spoke to high school students as part of the School for Ethics and Global Leadership in Washington.

Mr. Krogh’s marriages to Suzanne Lowell, Laura Lee Carkener and Ann Horton ended in divorce. Survivors include his partner, Nancy Glenn Hansen of Washington; two sons from his first marriage, Peter Krogh of Nevada City, Calif., and Matthew Krogh of Bellingham, Wash.; a stepdaughter from his second, Laura Dail of Manhattan; a son from his third, James Krogh of Shelton, Wash.; two sisters; a brother; and five grandchildren.

In December, HBO announced that it was planning a five-part series, “The White House Plumbers,” based in part on Mr. Krogh’s memoir. His story had become a kind of cautionary tale, he said, and once led him to write a memo of encouragement and advice to the newly inaugurated George W. Bush administration.

“In a section addressed specifically to the White House lawyers, I said that integrity required them to constantly ask, is it legal?,” he recalled in a 2007 New York Times op-ed, published amid a national debate over the war on terrorism. “And I recommended that they rely on well-established legal precedent and not some hazy, loose notion of what phrases like ‘national security’ and ‘commander in chief’ could be tortured into meaning. I wonder if they received my message.”