Named for the Commonwealth of Pennsylvania, she was laid down at the Newport News Shipbuilding and Drydock Company in October 1913, was launched in March 1915, and was commissioned in June 1916. Equipped with an oil-burning propulsion system, Pennsylvania was not sent to European waters during World War I, since the necessary fuel oil was not as readily available as coal. Instead, she remained in American waters and took part in training exercises; in 1918, she escorted President Woodrow Wilson to France to take part in peace negotiations.
During the 1920s and 1930s, Pennsylvania served as the flagship of first the Atlantic Fleet, and after it was merged with the Pacific Fleet in 1921, the Battle Fleet. For the majority of this period, the ship was stationed in California, based in San Pedro. Pennsylvania was occupied with a peacetime routine of training exercises (including the annual Fleet problems), port visits, and foreign cruises, including a visit to Australia in 1925. The ship was modernized in 1929–1931. The ship was present in Pearl Harbor on the morning of 7 December 1941; she was in drydock with a pair of destroyers when the Japanese launched their surprise attack on the port. She suffered relatively minor damage in the attack, being protected from torpedoes by the drydock. While repairs were effected, the ship received a modernized anti-aircraft battery to prepare her for operations in the Pacific War.
Pennsylvania joined the fleet in a series of amphibious operations, primarily tasked with providing gunfire support. The first of these, the Aleutian Islands Campaign, took place in mid-1943, and was followed by an attack on Makin later that year. During 1944, she supported the landings on Kwajalein and Eniwetok in the Marshall Islands and the Mariana and Palau Islands campaign, including the Battles of Saipan, Guam, Peleliu, and Battle of Angaur. During the Philippines campaign, in addition to her typical shore bombardment duties, she took part in the Battle of Surigao Strait, though due to her inadequate radar, she was unable to locate a target and did not fire. During the Battle of Okinawa, she was torpedoed by a Japanese torpedo bomber and badly damaged, forcing her to withdraw for repairs days before the end of the war.
Allocated to the target fleet for the Operation Crossroads nuclear tests in 1946, Pennsylvania was repaired only enough to allow her to make the voyage to the test site, Bikini Atoll. She survived both blasts, but was badly contaminated with radioactive fallout from the second test, and so was towed to Kwajalein, where she was studied for the next year and a half. The ship was ultimately scuttled in deep water off the atoll in February 1948.