Walsh was nominated by President Dwight D. Eisenhower on April 6, 1954, to the United States District Court for the Southern District of New York, to a new seat authorized by 68 Stat. 8. He was confirmed by the United States Senate on April 27, 1954, and received his commission the next day. His service terminated on December 29, 1957, due to his resignation.
Later career
After his resignation from the federal bench, Walsh served as Deputy Attorney General in the Eisenhower administration from 1957 to 1960. Thereafter, Walsh resumed the private practice of law in New York City, where he practiced from 1961 to 1981 as a partner at Davis Polk & Wardwell. There, he worked on the Bendectin litigation and represented companies such as General Motors and AT&T. In 1969, on the recommendation of his former boss, Secretary of State and former Attorney General William P. Rogers, Walsh was named as an ambassador in the United States Delegation to the Paris Peace Talks in 1969, but held the position for only a short period of time. He served as president of the American Bar Association from 1975 until 1976. In 1981, approaching Davis Polk's mandatory retirement age, Walsh moved his practice to his wife's home town of Oklahoma City, Oklahoma, where he joined the firm of Crowe & Dunlevy.
Independent Counsel
On December 19, 1986, Walsh was named as the independent counsel in charge of the Iran-Contra investigation. His investigation led to the convictions of both former Assistant to the President for National Security Affairs Vice Admiral John Poindexter and former NSC staffer Lieutenant Colonel Oliver North, though both convictions were subsequently reversed. Walsh also brought an indictment on two counts of perjury and one count of obstruction of justice against former Secretary of DefenseCaspar Weinberger in June 1992. That September, one count, obstruction of justice, was dismissed. On the eve of the 1992 presidential election, on October 30, Walsh obtained a grand jury re-indictment of Weinberger on one count of false statements. One phrase in that superseding indictment referred to President George H. W. Bush. Some believe that Bush had been closing the gap with Bill Clinton, and that this event stopped his momentum. Clinton administration attorney Lanny Davis called the decision to indict a week before the election rather than after the election "bizarre." Judge Thomas F. Hogan dismissed the October indictment two months later for being outside the statute of limitations. Weinberger's subsequent pardon by President George H. W. Bush in December 1992 preempted any trial. Walsh steadfastly denied that the investigation was politically motivated, while Bush and others criticized it as "the criminalization of policy differences." Walsh submitted his final report on August 4, 1993, and later wrote an account of his experiences as counsel, Firewall: The Iran-Contra Conspiracy and Cover-Up. In 2003, Walsh published his autobiography, The Gift of Insecurity: A Lawyer's Life. Walsh was the model for the hero of Jacob Appel's novel, The Biology of Luck. Walsh described having a fictional character based upon him as "flattering" during an August 2013 interview.
In his senior year of college, Walsh began to date Maxine Winton of Tampa, Florida, a former Barnard College student then attending Columbia Business School. They were married from 1936 until her death from cancer, at age 52, in 1964. In 1965, Walsh married Mary Alma Porter; they were married until her death on December 22, 2012. He was the father of five children — Barbara, Janet, Dale, Sara and Elizabeth. On January 8, 2012, Walsh celebrated his 100th birthday. On March 19, 2014, Walsh died at the age of 102 in Oklahoma City.