By 1523 Hamilton had returned to Scotland and joined the University of St Andrews. At first he remained unattached to any particular faculty, but on 3 October 1524 he was admitted into the faculty of arts.
While at St Andrews, Hamilton initially followed the traditions of the Church, even composing a mass for the office beginning ‘Benedicant dominum omnes angeli eius’. Hamilton acted as precentor when this mass was performed in St Andrews cathedral.
However, he soon began to support Luther’s theology openly and attract the attention of Archbishop James Beaton.
Rev. Peter Lorimer, Patrick Hamilton: The First Preacher and Martyr of the Scottish Reformation, (London, 1857), pp.236-238