The Witch trials in Denmark are poorly documented, with the exception of the region of Jylland in the 1609–1687 period. The most intense period in the Danish witchcraft persecutions was the great witch hunt of 1617–1625, when most executions took place, which was affected by a new witchcraft act introduced in 1617.
Sorcery was first criminalized in Denmark in the county laws of Scania and Zealand from 1170, which followed the contemporary principle that magic was prohibited only in combination with murder, which was a common principle in other contemporary laws against sorcery in the Middle Ages. Whether anyone was executed in Denmark for sorcery during the Middle Ages is unknown due to lacking documentation.
In the 16th century, the first known executions for witchcraft are documented in Denmark. The law had not changed, but the attitude toward witchcraft had become more strict as had the praxis of the law.
In the Köbenhavnske recess from 1547 it was stated that a testimony from a criminal was not a legal ground for a death sentence, and that torture was prohibited prior to a guilty verdict. The Kalundborgske recess from 1576 forbade the enforcement of any execution issued by a local court until confirmed by the high court. The 1576 law had a moderating effect on the witchcraft persecutions in Denmark up until 1617.
The Witchcraft Act of 1617 sorted sorcery crimes in two categories: those using magic without associating with the Devil should be exiled, while those who consorted with the Devil and who had made a pact with him should be executed by burning, regardless if they had performed magic or not. The witchcraft act of 1617 was in effect until 1686.
The Danish witch trials are not well documented. With some exceptions, such as the famous Copenhagen witch trial (1589) and the Køge Huskors (1608–1615), only the documentation of the region of Jylland from the period of 1609 to 1687 are preserved well enough to enable a proper investigation. Documentation of the witch trials in other parts of Denmark are preserved only partially or not at all.
In 1530, two women, "the wives of Lars Kylling and Jørgen Olsen", were executed by burning for sorcery on Bornholm and thus the first documented executions for sorcery in present-day Denmark. However, the island of Bornholm was not Danish at that time, and the first witchcraft executions in Denmark proper were, therefore, Karen Grottes and Bodil Lauritzen in 1540. In 1543, a large witch trial in Malmö, centered around Gyde Spandemager, attracted attention.
The Copenhagen witch trials in 1590–91 against Anna Koldings and her accused accomplices was connected to the first famous witch trial in Scotland, the North Berwick witch trials of 1590.
Between 1609 and 1687, 494 witchcraft executions were conducted on Jylland. The majority of them, 297, took place during the years of 1617–1625, which was a period of intense witch hunts in Denmark.
In October 1617, the witchcraft act Trolddomsforordningen af 1617 was introduced in Danish law, which made witch persecutions much easier and which was accompanied with an instruction by the king to local authorities and parish vicars to make use of it by investigating any suspected sorcery in their parishes. This resulted in the outbreak of a witch panic and a witch hunt in Denmark lasting for eight years until 1625, the documentation of which are preserved from the region of Jylland.
After the witch panic of the 1620s, the cases became fewer, likely because the prime victims during the great witch hunt had been marginalized people considered odd and reputed to be involved in sorcery, and that this category had been killed and fewer people of this kind was left to direct sorcery accusations toward. Between 1656 and 1687, only one person was executed for sorcery on Jylland, and in 1686, four people were executed as the last people executed for this crime in this region of Denmark. 80 percent of all executed were women. The most famous case of the region was the case of Maren Spliid in 1641, who belonged to the most known victims of the Danish witch hunt.
The public on Jylland was not interested in the Satan's sabbath or Devil's pacts, which were the main focus of the investigators, but generally directed their accusations toward people they accused of having harmed them or their animals or property by the help of magic. According to the Witchcraft Act, a death sentence could only be issued for the crime of Devil's Pact, and such a confession could only be attained by use of torture, which was forbidden prior to a guilty verdict. However, in practice, the judges adjusted to the common view and sentenced people to death on the grounds of sorcery alone. Most of those accused were poor women who had a long reputation of dealing with magic, and who were accused by their neighbors.
In 1636, Anne Pedersdatter Kasteføll was burnt at the stake in the middle of the main square in Ystad ('Ydsted'in the sources) in Scania. For a few years, Anne had peddled little bags with cloves of garlic, nails and strands of hair in exchange for happiness, good fortune and good health and a coin or two. She was very poor and would sometimes knock at people's doors and ask for a place to sleep and she would offer them a lucky charm if they said yes. This had been going on for about ten years, but recently there had been tales of bad things happening where Anne had been. Mette wife of Simon reported that her neighbours had said that Anne Pedersdatter had thrown something in front of their front door on Saint Canute's Day the year before and that Mette's little daughter had walked out the door right afterwards. Almost immediately, the little girl fell ill and remained in bed until three weeks after Easter. On the same day that the girl took to her bed, Anne had come to their home two or three times to ask how the girl was, although she didn't really know the family. Several similar accusations were brought against her from Ystad. It also turned out she had already been sentenced to exile for witchcraft in the city of Lund in 1624 but she had defied the verdict. To make it even worse, she was found to have several illegitimate children. On 16 November 1636, the Scanian County Court (Skaanninge landsting) issued the verdict that she should burn at the stake for being a 'throldquinde'.
In 1678, during the Scanian War, an old "Swedish witch" was caught by the Danish snaphaner in Ystad and handed over to the Danish fortress governor Ove Ramel at Kristianstad. She was suspected of spying and using witchcraft against the Danes, but Ramel decided to hand her over to the Swedes.
In 1686, the local courts were banned from performing executions without confirmation from the national high court. Anne Palles, who was executed in Copenhagen in 1693, has been referred to as the last person executed for sorcery in Denmark.
Anne Palles was the last woman to be legally executed for sorcery in Denmark, but her case was not the last Danish witch trial. The last large witch trial in Denmark was the Thisted witch trial of 1698, in which several women were sentenced to death accused of having caused fits by sorcery. After the fits were proved to be false, however, the condemned were freed. After that, the Danish authorities were reluctant to accept any more charges of witchcraft. When the local court of Schelenburg condemned two women to be burned at the stake for witchcraft in 1708, the sentence was revoked by the high court.
Anne Palles has been called the last "witch" to be executed in Denmark. She was also likely the last woman to be executed for sorcery in Denmark: however, the final person to be legally executed for sorcery in Denmark was in fact a man, the grenadier Johan Pistorius, in 1722. There were death sentences for witchcraft in Denmark long after this. In 1733 a student, and in 1752 a farmer, were sentenced to life imprisonment with forced labor for Satanic pact, and as late as in 1803, two craftsmen received death sentences for the same crime, although none of the sentences where actually carried out.
People were also lynched for witchcraft in Denmark long after the formal persecution stopped: the best known cases being that of Dorte Jensdatter, who was apprehended by villagers who tied her up in her own home and burned it down after having accused her of causing death by magic, and the last lynching for witchcraft, in which Anna Klemens was lynched after having been pointed out for sorcery by a cunning woman in Brigsted at Horsens in 1800.