On 13 June, following an overhaul at San Francisco and training at Pearl Harbor, "Cowpens" sailed on for San Pedro Bay, Leyte. Along the way she struck Wake Island on 20 June. Rejoining Task Force 58, "Cowpens" sailed from San Pedro Bay on 1 July to join in the final raids on the Japanese mainland. Her planes pounded Tokyo, Kure, and other cities of Hokkaidō and Honshū until 15 August. "Cowpens" was the first American carrier to enter Tokyo Harbor. Remaining off Tokyo Bay until the occupation landings began on 30 August, "Cowpens" launched photographic reconnaissance missions to patrol airfields and shipping movements, and to locate and supply prisoner-of-war camps. Men from "Cowpens" were the first Americans to set foot on the Japanese mainland, and were largely responsible for the emergency activation of Yokosuka airfield for Allied use and the liberation of a POW camp near Niigata. From 8 November 1945 to 28 January 1946 "Cowpens" made two voyages to Pearl Harbor, Guam, and Okinawa to return veterans on "Magic Carpet" runs.