Ogilvie, the son of a wealthy laird, was born into a respected Calvinist family near Keith in Banffshire, Scotland and was educated in mainland Europe where he attended a number of Catholic educational establishments, under the Benedictines at Regensburg in Germany and with the Jesuits at Olomouc and Brno in the present day Czech Republic. In the midst of the religious controversies and turmoil that engulfed the Europe of that era he decided to become a Catholic. In 1596, aged seventeen, he was received into the church at Leuven, Belgium. He joined the Society of Jesus in 1608 and was ordained a priest in Paris in 1610. After ordination he made repeated entreaties to be sent back to Scotland to minister to the few remaining Catholics in the Glasgow area (after the Scottish Reformation in 1560 it had become illegal to preach, proselytise for, or otherwise endorse Catholicism). He returned to Scotland in November 1613 disguised as a soldier, and began to preach in secret, celebrating mass clandestinely in private homes. However, his ministry was to last less than a year. In 1614, he was betrayed and arrested in Glasgow and taken to jail in Paisley. He suffered terrible tortures, including being kept awake for eight days and nine nights, in an attempt to make him divulge the identities of other Catholics. Nonetheless, Ogilvie did not relent; consequently, after a biased trial, he was convicted of high treason for refusing to accept the King's spiritual jurisdiction. On 10th March 1615, aged 36 years, John Ogilvie was paraded through the streets of Glasgow and hanged at Glasgow Cross.
His last words were "If there be here any hidden Catholics, let them pray for me but the prayers of heretics I will not have". After he was pushed from the ladder, he threw his concealed rosary beads out into the crowd. The tale is told that one of his enemies caught them and subsequently became a lifelong devout Catholic. After his execution Ogilvie's followers were rounded up and put in jail. They suffered heavy fines, but none was to receive the death penalty.