The town was founded on the site of a previous Polish settlement named "Łebno", dating back to the 10th century, Germanised to "Lewin" and then "Lewinburg" by the Teutonic Knights, after annexation from Poland in 1310. In 1341 Dietrich von Altenburg, Grand Master of the Teutonic Knights, granted 100 "Hufen" (similar to hides) to Rutcher von Emmerich for the foundation of a town named "Lewinburg" (Lauenburg) with Kulm rights, presumably to secure the territory around Stolp (Słupsk). East of the original city the Teutonic Order completed the "Ordensburg" castle in 1363. The castle was partly razed after the 1410 Battle of Grunwald and remained under Polish control until 1411. In 1440 the town joined the Prussian Confederation, which opposed the Teutonic Knights, and at the request of which King Casimir IV Jagiellon signed the act of re-incorporation of the town and region to the Kingdom of Poland in 1454. The population of Lauenburg was composed in large part of Kashubians, later Slovincians.