Medemblik was a prosperous trading town, when in 1282, Floris V, Count of Holland, successfully invaded West Friesland. He built several fortresses to control the region, one of which was Kasteel Radboud in Medemblik, and awarded Medemblik city rights in 1289. After Floris V had been murdered in 1296, the local Frisian besieged the castle, but in 1297 an army from Holland thwarted their efforts to starve out the inhabitants, which included Medemblik citizens.
Several more attacks took place in the following centuries. The most notorious of these happened in June 1517, when Medemblik was attacked from mainland Frisia by about 4000 pirates known as the Arumer Zwarte Hoop, led by Pier Gerlofs Donia and Wijard Jelckama. Many citizens fled to the castle, which the pirates unsuccessfully besieged. Eventually, they took out their fury on the town, which burned to the ground. After this the band continued their marauding path on land throughout present day North Holland.
Medemblik obtained town walls in 1572, so that the castle lost its roll as a refuge for the citizens, which led to its partially dismantling in 1578. Over the centuries the castle fell into decay, but in 1889 it became property of the crown and was restored to be used as a courthouse, which function it served until 1934. Anticipating the German invasion, the Rijksmuseum in September 1939 chose the castle as the initial hiding place of Rembrandt's Night Watch.
On January 1st 2007, Medemblik merged with the municipalities of Noorder-Koggenland and Wognum, yet retained its own name in the surviving municipality, even though it was the smallest of the three in population. Again on January 1st 2011, Medemblik merged with Andijk and Wervershoof into the municipality Medemblik.