On 7 December 1941, despite several strafing passes by Japanese aircraft during their attack, the Detroit got under way safely and shot down several enemy aircraft with her accurate antiaircraft fire. After investigating the west coast of Oahu for any signs of Japanese landings, she took part in a search for departing enemy warships. Within three days, the Detroit returned to Pearl Harbor and took up convoy escort duty.
Following the escort of two convoys to Pago Pago, Samoa, the Detroit sailed from San Francisco for Alaska on 10 November 1942. Here, she became flagship for Commander Task Group 8.6, whose mission was to prevent further enemy penetration of the Aleutian Islands.
On 12 January 1943, the Detroit covered unopposed landings on Amchitka to sever the Japanese supply line.
In April, she took part in the shelling of Holtz Bay and Chicago Harbor in Attu, before an assault and capture of the island. In August 1943, she provided cover for the recapture of Kiska, the last Japanese outpost in the Aleutians, which had already been secretly evacuated.
In June 1944, the Detroit saw action during bombardments of the Kurile Islands, and on 9 August she arrived in Balboa, Panama Canal Zone, and became temporary flagship of Southeast Pacific Forces. The Detroit arrived in Ulithi on 4 February 1945 for service with the Fifth Fleet, where she continued her service for the remainder of the World War II, entering Tokyo Bay on 1 September. She was one of just a few ships present at both Pearl Harbor and the surrender at Tokyo Bay. The Detroit was decommissioned on 11 January 1946 and sold the following month.