(German: Ordensburg Marienburg) was built by the Teutonic Order as an Ordensburg and named Marienburg (literally "Mary's Castle"). The town which grew around it was also named Marienburg. It is now known as Malbork. The castle is a classic example of a medieval fortress; it is the world’s largest brick gothic castle and one of the most impressive of its kind in Europe. The castle and its museum are listed as UNESCO's World Heritage Sites, being added to the register in December 1997 as Castle of the Teutonic Order in Malbork, as one of 2 sites in the region which owes its origins to the Teutonic Order, the Medieval Town of Toruń being the other, founded in 1231 as the site of their castle Thorn (Toruń).
In 1309 it become the main seat of the Grand Master of the Teutonic Order. Soon after, it developed into an economic military and administrative headquarter of the Teutonic State, which was at that time one of the most important in the region of southern coast of the Baltic Sea.
The castle was expanded several times to host the growing number of Knights, and became the largest fortified Gothic building in Europe, featuring several sections and walls. It comprises three separate sections- the High, Middle and Low Castles, separated by multiple dry moats and towers. The castle once housed approximately 3,000 "brothers in arms", and the outermost castle walls enclose 52 acres (210,000 m²), four times larger than the enclosed space of Windsor Castle.
The favourable position of the castle on the river Nogat and its relatively flat surrounding allowed for easy access by barges and trading ships, from the Vistula and the Baltic Sea. During their governance, the Teutonic Knights collected river tolls on passing ships, as did other castles along the rivers, imposing a monopoly on the trade of amber. When the city became a member of the Hanseatic League, many Hanseatic meetings were held at the Marienburg.
In summer of 1410, the castle was besieged following defeat at the Battle of Grunwald, but Heinrich von Plauen successfully led the defense of the castle during the Siege of Marienburg (1410) during which the city itself was razed.
In 1456, during the Thirteen Years' War started by a rebellion of the cities organized as Prussian Confederation. The Order, deserted and opposed by many of its taxpayers, could not pay its mercenary troops after two years of warfare. Hochmeister Ludwig von Erlichshausen moved the seat of the Order to Königsberg, and handed over possession of the castle to the soldiers from Bohemia, as a substitute for their wages. The mercenaries left after having sold the castle to King Casimir IV Jagiellon of Poland, who thus acquired a the castle neither he nor his predecessor could conquer by force. He entered the castle triumphantly in 1457 without opposition.
Under mayor Bartholomäus Blume, the city resisted the Polish onslaught for an additional three years, until he himself was captured and hanged in 1460. A monument to him was erected in 1864.
The castle and town passed to Polish control in 1466 as part of the province of Royal Prussia. Prior to the First Partition of Poland in 1772, Malbork served as one of the several Polish royal residences.
The castle was in the process of being restored to its presumed medieval appearance when World War II broke out. In 1945, the castle was over 50% destroyed as a result of fighting. The castle has since been mostly reconstructed and restoration has been ongoing since the war. However, the main cathedral in the castle, fully restored just prior to the war and destroyed during the war, remains in its ruined state.