The ancient stronghold was located in Tartu already in I millennium a.c. In 1030 the city was conquered by the troops of Jaroslav, the "Wise" Duke of Kiev. This event has been recorded in the old Russian chronicles and therefore the year 1030 is also considered the year Tartu as first mentioned in the written sources. In 1061 the Estonians conquered Tartu back.

Tartu passes from hand to hand in the war against the German order having started in the second half of the 13th century, when it finally remains in the hands of the Germans in 1224. In the same year Tartu and its surrounding are enfeoffed to bishop Hermann and Tartu becomes the centre of Tartu bishopric, the medieval vassal state. In 1280s Tartu is accepted as the member of Hansa Union and it becomes the prosperous trade city in the goods transit road of Pihkva and Novgorod.

After subordination of Pihkva and Novgorod to Moscow, the meaning of Tartu as the trade city decreases. At the beginning of the Livonian war Tartu is conquered by the Russian troops in 1558. The citizens are deported to Russia, Tartu remains under the Russian power up to 1582, when South Estonia goes under the Polish power according to the peace contract of Jam Zapolski. In 1583 the Polish establish the Jesuit Gymnasium in Tartu.

The city is passed from hand to hand in the Swedish-Polish wars at the beginning of the 17th century up to it remains in 1625 finally to the Swedes. In 1630 the gymnasium is founded in Tartu and in 1632 the university which gets the name Academia Gustaviana according to the Swedish king Gustav II Adolf. The university operates in Tartu with intervals (1656-1661 the city is again under the Russian power) up to 1699 when the university moves to Pärnu due to the aggravated international situation where it operates up to the year 1710. In the Northern War Tartu surrenders to the Russian troops in 1704.

The whole Estonian and Livonia, including the passing of Tartu ruined in war under the Russian power is fixed with the peace contract of Uusikauounki (Nystad) of 1721. In 1764 after the visit of the Duchess Katariina II, the setup of early-classicist Tartu starts. In 1763-67 Tartu is built up as the fortress. Tartu becomes a meaningful node on the postal road of St. Petersburg-Köningsberg.

In the years 1770-1780 the town hall and imposing Kivisild are built. In 1802 Tartu University is re-opened as the German imperial university. Tartu becomes the important research centre of the Russian empire, Tähetorn at the world level, university hospitals, library and botanical garden are established. Besides science, the German student life prospers in Tartu, Tartu is called the Athens of Emajõgi.