the town was originally an Old Prussian settlement known as Lecbarg until being conquered in 1240 by the Teutonic Knights, who called it Heilsberg.
In 1306 it became the seat for the Bishopric of Warmia and remained the Prince-Bishop's seat for 500 years.
In 1309 the settlement received town privileges. After the Second Peace of Thorn (1466), the town was integrated into the Polish province of Royal Prussia.
Nicolaus Copernicus lived at the castle for several years, and it is believed he wrote part of his De revolutionibus orbium coelestium there.
In the winter of 1703-04 the town was the residence of King Charles XII of Sweden during the Great Northern War.
Lidzbark was annexed with the rest of Warmia by the Kingdom of Prussia in the First Partition of Poland in 1772. In 1807 a battle took place near the town between the French under Murat and Soult and the Russians and Prussians under Bennigsen.
From 1933-45 Heilsberg was the site of the large radio station Transmitter Heilsberg. The town was heavily damaged during its conquest by the Soviet Red Army during World War II in 1945. Afterwards, the town was ceded to Poland and its ethnic German population was expelled to the west.