Born in Dumfriesshire, Scotland, he was educated at the Universities of Glasgow and Edinburgh, and ordained as a Presbyterian minister in 1835. He sailed to Canada a year later to take charge of a parish in Quebec City.
Cook was one of the founding Trustees of Queen's and was sent back to Scotland in 1840 on an early fundraising mission, which was less than completely successful.
Cook agreed to accept the Principalship quite reluctantly in 1857, with the understanding that he was holding the post only to lend stability to the University - after a long period during which Queen's had only an acting Principal and there was bitter feuding among faculty- until a more permanent man could be found for the job.
Cook was very fond of his Quebec parish and was said to find the citizens of Kingston much less congenial than those of his home. He wanted to give up the Principalship in 1858 and return to Quebec, but was persuaded to stay on for one more year so that the Board of Trustees could avoid having to appoint "a cold, caustic sarcastic Aberdonian," whom the Colonial Committee of the Church of Scotland was trying to foist on them as the right man for the job.
He returned to Quebec after a successor, William Leitch, was found in 1859. He became Principal of Morrin College, Quebec, in 1861 and retained that post until his death.
Cook was chosen Queen's first Chancellor in 1877 as a tribute to one of the University's few remaining founders and served in the post until 1879 (succeeded by Sir Sandford Fleming).
Cook also played a prominent part in bringing about the union of Presbyterian churches in Canada and was the first moderator of the Presbyterian Church in Canada.