Memel castle, sometimes called Memelburg, was built by the Teutonic Order on the site of the present city of Klaipeda (in mod. Lithuania), where the Dangè River (also called the Akmenè or Akmina) in the medieval period flowed into the Courland Lagoon (Ger. Kurisches Haff, Lith. Kuršiu marios), near the mouth of the Nemunas River (Memel). The lower Nemunas formed the boundary between Prussia and Lithuania throughout the Baltic Crusades, and was an important trade waterway into Lithuania and Russia.
Eberhard von Seyne, the representative of the Livonian master of the Teutonic Order, established the first fort at Memel in 1252 to guard communications between the territories of the Prussian and Livonian branches of the order, to protect its trade along the Nemunas, and to stop Scandinavian merchants from bringing arms and other goods to the pagan Samogitians and Lithuanians up the river. This first fort was wooden, surrounded by moats and earthen embankments. It was replaced by a stone castle on higher ground in 1253. Pope Innocent IV in 1253 allowed the Dominicans of Livonia and Prussia to collect alms for this rebuilding to stop the ferrying of “arms, clothing, salt and other necessities to the pagans of the aforementioned parts to the harm of Christian shipping” [Preufiisches Urkunden- buch, ed. Rudolf Philippi, 1/1 (Konigsberg: Hartung, 1882), no. 275].
Around the castle a town developed, which was the seat of the bishop of Curonia. However, its growth was hampered by constant attacks by the pagan Lithuanians and Samogitians, who destroyed the town and castle in 1323, 1360, 1365, 1379, 1393, 1402, and 1409. The Teutonic Order’s defeat in the battle of Tannenberg in 1410 left the order in a weakened state. By the Treaty of Melno (1422), which established the Prussian-Lithuanian boundary for centuries, the town and castle of Memel were left in Prussian territory, but their importance declined.