On January 2, 1677, the judicial machinery of the Scottish state focused its attention upon John Macgregor, a resident of the burgh of Greenock in Renfrew. His apprehension and subsequent involvement in the legal system marked the beginning of a formal inquiry into his conduct, as evidenced by case file C/EGD/1906. Within the climate of seventeenth-century Scotland, where the intersection of civil and ecclesiastical authority often scrutinised non-conformity and alleged maleficium, John was identified as a subject for investigation under the statutes pertaining to witchcraft.
Following his initial processing, the matter transitioned into a judicial proceeding under trial record T/JO/1136. As was customary in these mid-seventeenth-century trials, the transition from local suspicion to formal litigation required a rigorous adherence to the procedural requirements of the Justiciary Court. John was thus subjected to the scrutiny of the law, a process that formalised the allegations against him and brought the particulars of his life in Greenock to the attention of those charged with administering the judicial oversight of the period.