Murray attended the University of Edinburgh from 1732 to 1735, before enrolling at the University of Leiden in the Dutch Republic. In 1737, he embarked on the 18th century cultural excursion known as the Grand Tour; this included Rome, one of whose attractions was the exiled James Stuart. The Jacobite cause had been largely dormant since the 1719 Rising and when Murray met him, James was living quietly in Rome "having abandoned all hope of a restoration."