Archaeological sites in the city and its surroundings confirm the existence of human settlements in this area since early Stone Age and the presence of Romans at the beginning of the new era. During the rule of the Nemanjić dynasty in 13th and 14th century, Šabac was part of the Nemanjićs' state and belonged to the Mačva regional unit. The name Mačva dates from this period. Today it signifies the fertile flatland spreading from Šabac toward the river Drina, while in the olden days it signified the name of the city.
Throughout the Medieval Ages, a Slovene settlement known as Zaslon existed at the site of modern day Šabac. Zaslon signified a hill, an elevation, or a shield from water-induced catastrophes. The existence of this settlement was recorded in the Dubrovnik files dating back to 1454.
In the second half of 15th century, after the fall of Serbia under Turkish rule, the Turks conquered the Šabac area as well. In 1470, the Turks built a fortress at a convenient site where the banks of the Sava softly rise, not far from the estuary of the tiny river Kamičak. The fort was not great in dimensions but had strong and tall defending walls. With its towers protruding toward the Sava, the fortress represented a powerful stronghold throughout the centuries for Turkish opponents fighting for supremacy in the Balkans, Hungary, and later Austro-Hungarian empire. The Turks titled their newly built fortress and the city that had emerged around it Bejerdelen, Turkish for "the one hitting from the side". Conveniently located and fortified, the city acted as an important Turkish outpost from which it was easy to attack Hungarian territory, control the traffic on the Sava, and successfully perform many other military functions.
The name Šabac dates from a more recent period. It cannot be said with certainty exactly when and how this name first came about. There are several theories which aim to shed some light on the modern name of Šabac, but none have been confirmed thus far. The most likely one links the root of the city's name to its river: Sava - Savac - Šabac.
Šabac gained bigger historical importance for the Serbs with the First Serbian Uprising in 1804. Several important battles between the Turks and the Serbian rebels took place in the area surrounding Šabac.
The city went through its first sway of development at end of the Second Serbian Uprising. This period overlaps with the rule of a cultured and educated man, Jevrem Obrenović, the brother of count Miloš, who alone was literate among his brothers and who was a man of open and progressive views. He ruled Šabac for 15 years, changing from the root and improving the overall life of the small Turkish town. Only 6 months after Jevrem's arrival in Šabac, Stevan Živanović-Telemak wrote to Vuk Karadžić in Vienna: "Šabac has been made on Bair such that your eye is full of things to look at.".
This great man fought great fights with the backward and obsolete, nearly oriental attitudes towards life in Serbs at the time. He brought in the spirit of European civilization and the city began to look more like the towns of Preča. Jevrem employed engineers who laid foundations of the proper, urbanized construction of Šabac; he built roads and passed decisions on utility services. He offered the example of his own family members to teach Šabac residents of novelties and to encourage, at first the wealthier and then other citizens too, to follow their example in clothing, housing, manners, cultural habits, etc. Many things he introduced in Šabac were the first to see anywhere in Serbia. Instead of the traditional pipe or flute, Šabac was the first place in Serbia where one could listen to the sounds of the piano, or see the real window glass instead of the paper, or take a ride in a horse-carriage so beloved by the Šabac gentry. There were many other things too that Šabac was the first, or among the first, to get in those times.
The most valuable creations of Jevrem's rule that Šabac inhabitants take great pride in are certainly:
- County and town hospital and pharmacy built in 1826, the first of their kind in Serbia;
- Elementary school built in 1826, the first in Serbia after the Turkish rule;
- "Principal School" - grammar school built in 1837;
- First theatre plays in 1840;
- Music Society founded as the herald of the thriving musical life in Serbia - military barracks, coffee shops, etc.
Just like the rest of Serbia, Šabac welcomed the total and final liberation from the Turkish rule in 1867, when the last Turkish soldier left the fortress at the Sava. The second half of the 19th century was marked by an accelerated development of the city. Trade flourished, the first industrial manufacturing commenced, and the traditional agriculture was developing. Alongside Belgrade and Kragujevac, Šabac was becoming one of the most significant Serbian cities. Urban development was also on the rise. Swamps were being drained and new residential and business buildings built in their place. More and more of the Šabac inhabitants were starting to adopt ways of the European civilization. Thanks to its speedy development and the overall upspring, as well as its lively night life, Šabac soon earned a nickname of "Little Paris". Since 1883 citizens of Šabac were also able to read their own newspapers, the number of which rose to 11 by 1909.
The idyllic picture is torn apart by the First World War catastrophe. Large military operations throughout the four war years, as well as the bloodthirsty revenge of the Austro-Hungarian army, culminated in horrible suffering of Šabac and its surroundings. The city was destroyed, burnt down and plundered, and the surrounding villages met similar fate. The people was either killed or displaced, worn out and ill. In great poverty and with painful joy, citizens of Šabac welcomed their freedom in 1918. Out of the pre-war 14.000 inhabitants, barely 7.000 of them survived, and the number of houses was halved in two. The enemy did not even spare the Šabac church. Little comfort was it that the city once again came first in Serbia - this time thanks to its suffering and the three unique war merit medals: the French War Cross with a Palm (1920), the Czechoslovakian War Cross (1925) and the Star of Karađorđe.
Following its wartime demise, Šabac was called "the Serbian Verden", after the famous French city.
Between the first and the second world wars, Šabac managed to develop and grow, thanks primarily to its flourishing crafts, trade, and agriculture. At the end of this period, in 1938, chemical industry "Zorka" was transferred to Šabac from Subotica. Later, it will mark the multi-decade progress of the city and become its trademark. At the end of the 19th and the beginning of 20th century Šabac also yielded several important cultural and scientific names, including Stojan Novaković, Dr Laza K. Lazarević, Janko Veselinović, Milorad Popović - Šapčanin and others.
After just over two decades of peace and quite, war horrors engulfed Europe, including Šabac, once again. The Second World War ravaged these parts of Europe and already in the first war year Šabac was suffering badly. In September 1941 Germans brutally expelled about 5.000 Šabac inhabitants to a Srem village called Jarak, where they were kept in an improvised camp. Many of them never returned from this "Bloody March" as it came to be known later. During the war a concentration camp was set up in Šabac - some 25.000 citizens went through it in four war years. The city had a total of about 7.000 victims of the Second World War. The freedom finally arrived on 23 October 1944.
During the first post-war years, the whole of war-torn Yugoslavia was building and reconstructing itself enthusiastically. "Zorka" - the chemical factory - spearheaded the development of contemporary Šabac. New plants were being built, roads constructed, and electricity introduced. New modern buildings replaced old decimated ones. Unfortunately, some of the things that characterized the spirit of old Šabac disappeared along the way, but it was a price to be paid in an age that never had time for the emotional side of life. In the 1970s Šabac went through its true golden age.
Several capital investments made in this period forever changed the appearance of the city. In Benska bara, marshland just outside of Šabac that offered refuge to birds for centuries, a new residential area was built. Then came the new concrete bridge over the Sava, sports hall "Zorka" with indoor swimming-pool and football grounds, two-star hotel "Sloboda", city stadium, new schools, kindergartens, culture centres, bus station. A large number of comfortable family homes were built in the suburbs of Trijangla, Kasarske and Šipurske medows, Letnjikovac... Settlements previously physically distanced from Šabac by a few kilometres blended with the city as it was the case with Dumača, Pocerski Pričinović, Jevremovac, Bogosavac, Majur, etc.
By the end of the century, Šabac and its suburbs had about 70.000 inhabitants, which made it a respectable city according to domestic standards.