Archaeologists dated the first settlement near Torun to 1,100 BC. During early medieval times, there was an old Slavonic settlement here, at a ford in the Vistula river.

In 1231 the Teutonic Knights crossed the river Vistula at the height of Nessau and established a fortress. On 28 December 1233, the Teutonic Knights Hermann von Salza and Hermann Balk signed the foundation charters for Thorn and Kulm (Chełmno).

The original document disappeared in 1244. The rights are generally known as "Kulm law". In 1236, due to frequent flooding, it relocated to the present site of the Old Town. Franciscan monks settled in the city in 1263, followed in 1239 by Dominicans.

In 1264 New Town emerged to house Torun's growing population of craftsmen and artisans. The city (or as it was then, both cities) joined the mercantile Hanseatic League in 1280, and thus became an important medieval trade centre.

First Peace of Thorn

The First Peace of Thorn ending the Polish–Lithuanian–Teutonic War was signed in the city in 1411. In 1440, the gentry of Thorn formed the Prussian Confederation, and in 1454 rose with the Confederation against the Monastic state of the Teutonic Knights in the Thirteen Years' War. After almost 200 years, the New and Old Towns amalgamated in 1454.

The Poles destroyed the Teutonic castle. The Thirteen Years' War ended in 1466 with the Second Peace of Thorn. Then the Teutonic Order ceded their control over western provinces, becoming part of Royal Prussia. Thorn remained a free city, now under the patronage of the Polish king.

In 1557, during the Protestant Reformation, the city adopted Protestantism. In 1595 Jesuits arrived to promote the Counter-Reformation, taking control of St. John's Church. The Protestant city officials tried to limit the influx of Catholics into the city, as Catholics already controlled most of the churches, leaving only St. Mary's to Protestant citizens.

During the Great Northern War, preparation of Augustus the Strong's restoration as King of Poland took place by the Treaty of Thorn by Russian Tsar Peter the Great.

In the 2nd half of the 17th century, tensions between Catholics and Protestants grew. In the early 18th century about 50 percent of the populace, especially the gentry and middle class, were German-speaking Protestants, while the other 50 percent were Polish-speaking Roman Catholics. Protestant influence was then pushed back after the Tumult of Thorn in 1724.