The beginnings of settlement in Żary date back to prehistoric times. The word "Zara" (which probably referred to a small independent Slavonic tribe) appeared for the first time in Thietmar's Chronicle from 1007. At that time, during the reign of Boleslaus the Brave, the Land of Żary and Lusatia were attached to Poland.
The town was located according to the Magdeburg Law about the year 1260. Żary had three centres: a market settlement situated near the "salt route" leading from Leipzig to Wrocław, a stronghold (later on a castle) erected among swamps and a Franciscan settlement dating back to 1274.
As a consequence of turbulent history of the Silesian and Lusatian borderland, Żary frequently changed its rulers. The town was under the control of Silesian Piasts (until 1364), Czech kings (until 1635), Saxon electors (until 1815) and Prussian rulers.