Bar is a shortened form of Antivari, which is derived from the town's location across the Adriatic Sea from Bari, Italy. Variations are in Italian, Antivari / Antibari; in Turkish, Bar; in Albanian, Tivari or Tivar; in Greek, Θηβάριον, Thivárion, Αντιβάριον, Antivárion; in Latin, Antibarium.
Local archaeological findings date to the Neolithic era. It is assumed that Bar was mentioned as the reconstructed Roman castle, Antipargal, in the 6th century. The name Antibarium was quoted for the first time in the 10th century.
In the 6th and 7th centuries, Slavs occupied the Balkans. Duklja, a Slavic, or Serbian state, was mentioned in the 10th century. Jovan Vladimir (ruler 1000 – 1016), of Skadarska Krajina is the first ruler of Duklja whose history is known. Stefan Vojislav (ruler 1018 – 1043), the eponymous founder of the Vojislavljević dynasty, defeated the Byzantines in a battle on a hill near Bar. He made Bar his seat of power. Vojislav then expanded the area under his rule. Mihailo I of Duklja (ruler 1050 – 1081), Vojislav's son, established the Archdiocese of Antivari. He continued to fight the Byzantines in order to secure the town's independence. This led to a union of states known as the Serbian Grand Principality. From 1101 to 1166, the principality was ruled by the Vukanović dynasty. However, for much of this time, Bar was under Byzantine rule. In 1183, Stefan Nemanja conquered Bar and it stayed under Serbian control under the Nemanjić dynasty and until the fall of Serbian Despotate in 1459.
From 1443 to 1571, the region was ruled by the Venice. Bar (called Antivari by the Venetians, was part of the Albania Veneta. It was a city state with its own coat of arms, flag, statute and mint. In 1571, the Ottomans captured Bar and held the town until 1878. The archdiocese was preserved. One of the archbishops during this period was Andrija Zmajević. The Ottomans ceded Bar to Montenegro at the Treaty of Berlin.
Guglielmo Marconi, the Italian scientist and pioneer in wireless telegraphy, made a radio connection between Bar and Bari on 30 August 1904. In 1908, the first railroad in this part of the Balkans was put into operation. During World War I, on 16 August 1914, the Austro-Hungarian navy's light cruiser SMS Zenta and an accompanying destroyer became trapped off Bar by a very large French fleet (over twelve battleships) and in the subsequent battle of Antivari the Zenta was sunk with considerable loss of life. The destroyer escaped.