A Prussian fishing village sprang up on the coast at some point in the 13th century, taking its name from pils, the Old Prussian word for "fort". A great tempest created the navigable lagoon in front of the village on September 10, 1510. This fostered the growth of Pillau into an important port of the Duchy of Prussia. A blockhouse was constructed in 1537, followed by a system of storehouses in 1543 and the earliest fortifications in 1550.
During the Thirty Years' War, the Swedes occupied the harbor in the aftermath of their victory over the Polish–Lithuanian Commonwealth. King Gustavus Adolphus landed there with his reinforcements in May 1626. After the ceasefire of Altmark in 1629, the Swedes retained Pillau and set out upgrading its fortifications. They constructed a star fort which remains one of the town's landmarks. In 1635, the citizens of Pillau paid the ransom of 10,000 thalers, whereupon Swedish forces handed over the settlement to the Elector of Brandenburg.
By the end of the 17th century, the town had expanded considerably. A lighthouse and a stone church were built. Peter the Great of Russia visited Pillau on three occasions, the first being in 1697, in connection with his Great Embassy to Western Europe. There is a statue of the Tsar next to the lighthouse. After Pillau was granted town privileges in 1725, the town hall was constructed. This Baroque edifice, inaugurated in May 1745, was destroyed at the end of World War II.
Russian forces occupied the town during the Seven Years' War and built a small Orthodox church there. The event is commemorated by the equestrian statue of Empress Elizabeth, unveiled in 2004. In June 1807, Pillau was stormed by Napoleon's Grand Army. No outstanding events took place during the rest of the 19th century. Records of aScottish "colony" established here in 1815 appeared in an 1890 publication, although their authenticity is questionable. The lighthouse was built up to a height of 31.38 meters (103.0 ft) and the entire fortress was updated and rebuilt by the Prussians in 1871.
On November 15, 1901, a ship canal was opened between the Frisches Haff and Königsberg. Constructed at a huge cost of thirteen million marks, the waterway allowed vessels of a 21 feet (6.4 m) draught to moor alongside the city or to sail to the capital of East Prussia without stopping at Pillau. This dealt a serious blow to the town's economy.
During World War II, Pillau had a U-boat training facility. On April 16, 1945, the U-78 was sunk by Soviet artillery fire while she was docked near the electricity supply pier in the German port. This was the only U-boat to be ever sunk by land-based forces in World War II.
As the Red Army entered East Prussia, more than 450,000 refugees were ferried from Pillau to central and western Germany. Pillau was eventually captured by Soviets on April 25, 1945.
After the war, this part of East Prussia passed to the Soviet Union and the German inhabitants were expelled. During the Russification campaign, the town's name was changed to Baltiysk in 1946.
In 1952, the Soviet authorities inaugurated a naval base of the Baltic Fleet of the Soviet Navy at Baltiysk. As a result, it became a closed town: access was forbidden to foreigners or those without a permit. During the Cold War it was served by the Baltiysk air base. The town, along with Kaliningrad, remains one of only two year-round, "ice-free" ports along the Baltic Sea coastline available to Russia.
Within the framework of administrative divisions, Baltiysk serves as the administrative center of Baltiysky District. As an administrative division, it is, together with two rural localities, incorporated within Baltiysky District as the town of district significance of Baltiysk. As a municipal division, the town of district significance of Baltiysk is incorporated within Baltiysky Municipal District as Baltiyskoye Urban Settlement.
Baltiysk has a temperate oceanic climate (Köppen Cfb). Winters are cold to mild, while summers are warm. In July and August, the warmest season, high temperatures average 21 °C (70 °F) and low temperatures average 15 °C (59 °F). In January and February, the coldest season, high temperatures average 3 °C (37 °F) with low temperatures averaging −2 °C (28 °F).