In June 1704, Margaret Wallace was among a group of seven individuals accused of causing the affliction of Patrick Morton, the sixteen-year-old son of a smith residing in the Fife town of Pittenweem. The legal proceedings against Margaret emerged from a broader atmosphere of alarm, as town officials sought to address what they termed a case of possession. In their pursuit of a formal judicial process, the authorities drew a direct parallel to the contemporary and well-publicized case of Christian Shaw, known as "Bargarran’s daughter," whose reported torments in the west of Scotland had served as a precedent for such accusations.
The state’s interest in the matter was significant; the Privy Council intervened by appointing Her Majesty’s Advocate, Sir James Stewart, to lead the prosecution. Reflecting the perceived gravity of the charges, the Council took the unusual step of funding the legal proceedings directly from the royal treasury. In a move to ensure the matter was handled decisively within its own context, the Privy Council ordered that the trial of Margaret and her co-accused be conducted within the locality, overseen by the Lord Advocate himself.