The castle is a classic example of a medieval fortress and, on its completion in 1406, was the world's largest brick castle.[3]UNESCO designated the "Castle of the Teutonic Order in Malbork" and the Malbork Castle Museum a World Heritage Site in December 1997.[4] It is one of two World Heritage Sites in the region with origins in the Teutonic Order. The other is the "Medieval Town of Toruń", founded in 1231 as the site of the castle Thorn (Toruń).

The castle was built by the Teutonic Order after the conquest of Old Prussia. Its main purpose was to strengthen their own control of the area following the Order's 1274 suppression of the Great Prussian Uprising of the Baltic tribes. No contemporary documents survive relating to its construction, so instead the castle's phases have been worked out through the study of architecture and the Order's administrative records and later histories. The work lasted until around 1300, under the auspices of Commander Heinrich von Wilnowe.[5] The castle is located on the southeastern bank of the river Nogat. It was named Marienburg after Mary, patron saint of the religious Order. The Order had been created in Acre (present-day Israel). When this last stronghold of the Crusades fell to Muslim Arabs, the Order moved its headquarters to Venice before arriving in Poland.

The castle was expanded several times to house the growing number of Knights. Soon, it became the largest fortified Gothic building in Europe,[6] on a nearly 52-acre (21 ha) site. The castle has several subdivisions and numerous layers of defensive walls. It consists of three separate castles - the High, Middle and Lower Castles, separated by multiple dry moats and towers. The castle once housed approximately 3,000 "brothers in arms". The outermost castle walls enclose 52 acres (21 ha), four times the acreage of the enclosed space of Windsor Castle. The developed part of the property designated as a World Heritage Site is 18.038 ha (44.57 acres).[7]

The favourable position of the castle on the river Nogat allowed easy access by barges and trading ships arriving from the Vistula and the Baltic Sea. During their governance, the Teutonic Knights collected river tolls from passing ships, as did other castles along the rivers. They controlled a monopoly on the trade of amber. When the city became a member of the Hanseatic League, many Hanseatic meetings were held there.

In 1456, during the Thirteen Years' War, the Order – facing opposition from its cities for raising taxes to pay ransoms for expenses associated with its wars against Kingdom of Poland – could no longer manage financially. Meanwhile, Polish General Stibor de Poniec of Ostoja raised funds from Danzig for a new campaign against them. Learning that the Order's Bohemian mercenaries had not been paid, Stibor convinced them to leave. He reimbursed them with money raised in Danzig.[8] Following the departure of the mercenaries, King Casimir IV Jagiellon entered the castle in triumph in 1457, and in May, granted Danzig several privileges in gratitude for the town's assistance and involvement in the Thirteen Years' War (1454–66) as well as for the funds collected for the mercenaries that left.[9]

The mayor of the town around the castle, Bartholomäus Blume, resisted the Polish forces for three more years, but the Poles captured and hanged him in 1460.[10] A monument to Blume was erected in 1864.[11]

In 1466 both castle and town became part of Royal Prussia, a province of Poland. It served as one of the several Polish royal residences, fulfilling this function until the Partitions of Poland in 1772. During this period the Tall Castle served as the castle's supply storehouse, while the Great Refectory was a place for balls, feasts, and other royal events.

After Prussia and the Russian Empire made the First Partition of Poland in 1772, the town became part of the Kingdom of Prussia province of West Prussia. At that time, the officials used the rather neglected castle as a poorhouse and barracks for the Prussian Army. In 1794 David Gilly, a Prussian architect and head of the Oberbaudepartement, made a structural survey of the castle, to decide about its future use or demolition. Gilly's son, Friedrich Gilly, produced several engravings of the castle and its architecture, which he exhibited in Berlin and had published by Friedrich Frick from 1799 to 1803. These engravings led the Prussian public to "rediscover" the castle and the history of the Teutonic Knights.[12]

At the conclusion of the war, the city of Marienburg (Malbork) and castle became again a part of Poland. The castle has been mostly reconstructed, with restoration ongoing since 1962 following a fire in 1959 which caused further damage. The main cathedral in the castle, restored just before World War II and then destroyed in battle, is still in ruins. Nevertheless, Malbork Castle remains the largest brick building in Europe.

Panoramic image of Malbork Castle from the Northwestern bank of the river Nogat