Denfeld was selected to be aide to the Chief of Naval Operations in 1939, then commanded first Destroyer Division 18, then Destroyer Squadron 1 from 1939 to 1941. He served as Chief of Staff to the Commander of the United States Atlantic Fleet, Admiral Royal E. Ingersoll. For planning of safe routes for escort convoys in this capacity, Denfeld received the Legion of Merit. He became head of the Atlantic Fleet Support Force in 1941, then assistant chief to the Bureau of Navigation in 1942. He led Battleship Division 9 in 1945, was appointed Chief of the Bureau of Personnel in 1945, and commanded United States Pacific Command and Pacific Fleet in 1947.