Artefacts dating from the prehistoric to the Byzantine period could be found in many places across Kozani. The city was founded by Christian settlers who, after the Ottoman conquest, withdrew from the plains of Macedonia to the mountains, during the XIV-XV centuries.
The secure position of the area attracted other Christians expelled from Epirus in 1392. Together with them, many cattle-breeders also moved to the region.
The first recorded mention of Kozani is in an Ottoman register dating back of 1528, as a settlement with 91 houses. In 1664, the church of Agios Nikolaos was built.
In 1668, the library and the school of Kozani were established. During the XVII and XVIII century, commercial relations with the countries of central Europe helped the city to flourish economically.
In 1770 the growth of Kozani was disrupted, because of conflict between the local inhabitants and Kozanite merchants in central Europe. In the same year, the city was pillaged by Ottoman beys.
In 1830, a subsequent incursion by Aslan bey ravaged Kozani immensely. In 1855 in the nearby St. Nicholas Church a 26 meters high bell tower was built – the future symbol of the city.
In 1939, a clock donated by Greek-American, Konstantinos Mamatsios was added to the top of the tower. In 1904 the population was of 12,000 Greeks and 350 Vlachs.
In the late XIX and XX century, Kozani was part of the Manastir Vilayet of the Ottoman Empire.
On 11 October 1912, the Greek army entered Kozani, during the First Balkan War, after its victory against the Ottoman army in the Battle of Sarantaporo. In 1923, during the exchange of population between Greece and Turkey, around 1,400 Greek families coming from Pontus and Asia Minor settled in Kozani.
In the XX century, Kozani grew drastically. The lignite reserves in the area began being used by the Public Power Corporation, making Kozani the foremost producer of electrical power in Greece.
The Municipal Library of Kozani called "Kovendareios" is the second biggest in Greece, with its 150,000 books, rare publications and valuable documents. Kozani was included in the National Cultural Network of Cities. The Institute of Book and Reading was also established and Kozani is now known as a “City of Books”.