A supporter of James Edward Stuart's claim to the English and Scottish thrones, Alexander spent much of his life overseas following the defeat of the Jacobite cause in 1745.
He settled in London in 1754, where the architect James Gibbs, his friend and fellow Scots Catholic, had left him a house.
In 1768, William Franklin, the Royal Governor of New Jersey, invited Alexander to his mansion in Burlington to do commission work.
Stuart planned to continue his studies under Alexander, but the elder painter died in Edinburgh the following year on 25 August 1772.
A fictional lost painting by Cosmo Alexander is a plot point in the 1927 novella The Case of Charles Dexter Ward by horror writer HP Lovecraft.