He served at sea and also held important posts ashore. Promoted to rear admiral in 1927, he headed the Bureau of Ordnance (1927–1931) and then the Bureau of Navigation (1933–1935). He was made a vice admiral in 1935. In January 1937, Leahy was promoted to admiral and appointed by President Roosevelt as chief of naval operations (CNO). As CNO, he argued for naval expansion. After retiring from the navy in August 1939, he served as governor of Puerto Rico (September 1939–November 1940). Roosevelt next named him U.S. ambassador to Vichy France.
In May 1942, Roosevelt recalled Leahy to active duty and made him his chief of staff and unofficial chairman of the Joint Chiefs of Staff (JCS). Leahy also presided over the Combined Chiefs of Staff meetings when the United States was the host. Throughout the war years, he was an adviser and confidant to Roosevelt, especially during meetings with Allied heads of state at places such as Casablanca, Cairo, Tehran, and Yalta. A strong nationalist, Leahy did not put much credence in Roosevelt's cherished United Nations. In December 1944, he won promotion to Fleet Admiral, becoming the first naval officer to be so promoted.
When Roosevelt died on 12 April 1945, Leahy became one of President Truman's closest advisers, playing an important role at the Potsdam Conference of July and August 1945. He opposed dropping the atomic bomb on Japan, urging Truman to continue conventional bombing and to tighten the naval blockade in the belief that Japan was ready to sue for peace. He also feared that the atomic bomb might not work.
After the war, Leahy played a major part in the formation of the National Security Act of 1947. His advice helped lead to the subsequent establishment of the National Military Establishment (NME), later known as the Department of Defense, and the Central Intelligence Group, later known as the Central Intelligence Agency. He continued to play vital roles in the formation and expansion of the National Security Council (NSC), the JCS, and the North Atlantic Treaty Organization (NATO).
Leahy was an ardent anticommunist who shared Truman's abiding distrust of the Soviet Union. He retired from government service in March 1949 but continued to act as a key adviser to the secretary of the navy. He also helped establish the Naval Historical Foundation and served as its first president. In 1950, Leahy published his autobiography, I Was There. He died on 20 July 1959, in Bethesda, Maryland.
Adams, Henry H. Witness to Power: The Life of Fleet Admiral William D. Leahy. Annapolis, MD: Naval Institute Press, 1985.; Larrabee, Eric. Commander-in-Chief: Franklin D. Roosevelt, His Lieutenants, and Their War. New York: Harper and Row, 1987.; Leahy, William D. I Was There: The Personal Story of the Chief of Staff to Presidents Roosevelt and Truman, Based on His Notes and Diaries Made at the Time. New York: McGraw-Hill, 1950.