After succeeding Nixon, Ford, for stability, retained the cabinet, including Mr. Schlesinger. But the president and Mr. Schlesinger were soon at loggerheads. Ford favored “leniency” for 50,000 draft evaders after the Vietnam War. Mr. Schlesinger, like Nixon, had opposed amnesty. Unlike Mr. Schlesinger, Ford was willing to compromise on defense budgets, and he recoiled at Mr. Schlesinger’s harsh criticisms of congressional leaders. These were not grave policy disputes, but the two were personally incompatible.

“There was a tension,” Mr. Ford acknowledged later.

Mr. Schlesinger’s blunt talk and uncompromising ways seemed insubordinate to Ford, and struck many White House officials as arrogant and patronizing. Besides his prickly relations with the president, Mr. Schlesinger differed with Mr. Kissinger over nuclear strategy, aid to Israel and other issues. In November 1975, after 28 months in office, he was dismissed.

While often criticized by political opponents and in the press, Mr. Schlesinger was viewed by many historians as an able defense secretary who modernized weapons systems and maintained America’s military stature against rising Soviet competition.

In his 1976 presidential campaign, Mr. Carter consulted Mr. Schlesinger and was impressed. Taking the White House in 1977, Mr. Carter named him his energy adviser and, after the Energy Department was created in a merger of 50 agencies, appointed him its first secretary. The only Republican in the Carter cabinet, he was in charge of 20,000 employees and a $10 billion budget.

Mr. Schlesinger, an outspoken advocate of nuclear power, shared with Mr. Carter a belief that fossil fuels were destined for exhaustion, and warned that Arab oil supplies were unreliable. As oil prices rose and acute shortages and long lines at gasoline pumps formed, he and Mr. Carter endorsed conservation, tax incentives and synthetic fuels. The crisis passed, but not the energy problems.

While he helped establish the new department and developed proposals intended to alter life in a nation addicted to enormous energy consumption, Mr. Schlesinger’s performance was widely criticized. Congressional opposition contributed to his departure in a 1979 cabinet shake-up by President Carter.

“In that administration, for some strange reason, I was the voice of experience, or the only voice of experience,” Mr. Schlesinger said years later for an oral history project. “I’m not sure whether that was a good thing or a bad thing. It was a mixed virtue, because that meant that in some sense I shared the contamination of the past and therefore my views, while they were interesting, and useful, had to be viewed with suspicion because they were views from the pre-1976 past.”