From 1967 to 1969, he was an Assistant U.S. Attorney in the Southern District of New York under Robert M. Morgenthau, Jr. His work focused on the use by Americans of foreign banks and other financial institutions to violate US laws.

As a New York state administrative judge in 1975–76, he handled the first major environmental action involving PCBs, specifically their discharge by General Electric into the Hudson River.[1] After issuing an opinion holding GE liable despite its having been issue with a license, Sofaer worked with Peter Berle, then head of NY’s Department of Environmental Conservation, Sarah Chassis, lead attorney for the National Resources Defense Council, and Jack Welch, then VP at GE to settle the case in an agreement joined by 17 environmental organizations. This work led to Sofaer being recommended to a committee established by Senator Daniel Patrick Moynihan (chaired by former White House Counsel Leonard Garment) to screen candidates for the federal district courts in New York state.

He was nominated to the district court for the Southern District of New York by Jimmy Carter on January 19, 1979, on the recommendation of Senator Moynihan, to a seat vacated by Marvin E. Frankel, confirmed by the United States Senate on March 21, 1979, and received his commission on March 23, 1979.

On June 9, 1985, then-Secretary of StateGeorge Schultz asked Sofaer to become Legal Adviser of the Department of State, a position in which he served until 1990. According to his Hoover Institution biography, Sofaer "was principal negotiator in various interstate matters that were successfully resolved, including the dispute between Egypt and Israel over Taba, the claim against Iraq for its attack on the USS Stark, and the claims against Chile for the assassination of diplomat Orlando Letelier. He received the Distinguished Service Award in 1989, the highest State Department award given to a non-civil servant."[1] He assisted Shultz in forcing disclosures that led to the termination of arms dealings with Iran as part of the Iran Contra scandal. See his description of these activities at http://www.abesofaer.com.

After leaving the Department of State, Sofaer practiced law at Hughes Hubbard & Reed in Washington, D.C., from 1990 to 1994. He represented WWF International (chaired by Prince Philip) in its successful effort to establish an MOU with WWF US for the management and sharing of authority within what remains the world’s most influential environmental organization; WWF US was represented by the Washington, DC attorney and later White House Counsel, Lloyd Cutler. During this period he began sitting as an arbitrator in major international and domestic disputes. He agreed during this period to assist Libya in attempting to satisfy the UN Security Council Resolutions issued against it concerning the PanAm 103 terrorist bombing. He worked out a plan with Libyan officials including a trial of the suspects in The Hague and compensation to the families before accepting the assignment. After publicly obtaining a license for the work, however, Sofaer was attacked by some family members of the victims and criticized by US officials opposed to any such negotiation. He withdrew from the representation as he concluded he could not be effective in implementing the agreed plan while defending himself. Nonetheless, Sofaer was subject to a grand jury investigation into whether he had made false statements in applying for the license from the Treasury Department's Office of Foreign Assets Control to represent Libya.[3] The investigation was terminated without any action against him, but the DC Bar found that Sofaer should be “informally admonished” for taking on the representation, on the ground that the US government investigation of the bombing was a “matter” under the Code of Ethics, like a litigation or appeal, and even though Libya was not even a suspect at the time Sofaer left the Department. (The plan Sofaer developed was ultimately agreed and implemented by the US, the Council, and Libya.)

In 1994, Sofaer was appointed George P. Shultz Senior Fellow in Foreign Policy and National Security Affairs at the Hoover Institution. His "work has focused on separation of powers issues in the American system of government, including the power over war, and on issues related to international law, terrorism, diplomacy, national security, the Middle East conflict, and water resources.” For several years, he taught a course on transnational law at the Stanford Law School, and is currently scheduled to teach arbitration. At Hoover he has published many op-eds, articles, chapters in books, and two books on international security issues: “The Best Defense?: Legitimacy and Preventive Force; Taking on Iran: Strength, Diplomacy & The Iranian Threat (Hoover 2013)."

Sofaer's father was a cousin of the actor Abraham Sofaer. Their fathers Meyer and Isaac were born in Rangoon, Burma, the descendants of Jewish immigrants from Baghdad, Iraq. They built a trading business in Rangoon, the evidence of which can still be seen in the form of Sofaer’s Building, a large office and retail center which the city is attempting to restore along with other colonial era buildings.