The name of Shamkir is associated with the self-titled ancient fortress, the ruins of which are located 20 km from the city, near the village of Mukhtariyyat. It is assumed that the city itself was founded at the turn of the V-VI centuries. This city, known in the Middle Ages as Shamkur, was situated on the bank of the river of Beyuk Shamkir, flowing along the slopes of the Lesser Caucasus. At that time, the city occupied a territory with an area of only 20 hectares, and had a feudal castle with eight towers. The wealth of the city attracted foreign merchants and conquerors for quite a long time. After another rout, local population moved to a place located 9-10 km from the ruined city.
The city of Shamkir - the way we see it now - was founded in 1818 by German settlers. In the summer of that year, 194 German families relocated from Tiflis to Elisavetpol province of Azerbaijan. There, they’d founded two colonies – both located near Shamkhor (present-time Shamkir) - Annenfeld and Elenendorf (present-day Gokgol). February 9, 1916, since Russian Empire declared a war to Germany, the colony’s name was altered to "Annino". Since 1938, the settlement was renamed to "Shamkhor", which in 1939 received the status of "urban settlement".
On February 7, 1991, the city and the homonymous area "Shamkhor" were renamed into the historical name of the area, "Shamkir".