The city was named Constantiana in honour of the half-sister of Roman Emperor Constantine the Great. The city lay at the seaward end of the Great Wall of Trajan, and has evidently been surrounded by fortifications of its own. Having been part of the Bulgarian Empire for over 500 years, and later of the independent principality of Dobrotitsa and of Wallachia under Mircea I of Wallachia, Constanța fell under the Ottoman rule around 1419.
A railroad linking Constanța to Cernavoda was opened in 1860. In spite of damage done by railway contractors, there are considerable remains of ancient masonry walls, pillars, etc. An impressive public building, thought to have originally been a port building, has been excavated, and contains the substantial remains of one of the longest mosaic pavements in the world.
In 1878, after the Romanian War of Independence, Constanța and the rest of Northern Dobruja were ceded by the Ottoman Empire to Romania. The city became Romania's main seaport and transit point for many of Romania's exports. The Constanta Casino, which is both a historic monument and a modern symbol of the city, was the first building constructed on the shore of the Black Sea after Dobruja came under Romanian administration, with the cornerstone being laid in 1880.
On October 22, 1916 (during World War I), the Central Powers (German, Turkish and Bulgarian troops) occupied Constanța. According to the Treaty of Bucharest in May 1918, Constanța remained under the joint control of the Central Powers. Allied troops liberated the city in 1918 after the successful offensive on the Thessaloniki front knocked Bulgaria out of the war.
In the interwar years, the city became Romania's main commercial hub, so that by the 1930s over half of the national exports were going through the port. During World War II, when Romania joined the Axis powers, Constanța was one of the country's main targets for the Allied bombers. While the town was left relatively undamaged, the port suffered extensive damage, recovering only in the early 1950s.