In 1838 he was elected Rector of the University of Glasgow, an award quickly followed with the Freedom of the same city. However, Grahams representation in Wales was short lived. In 1838 Owen's mounting debts led him to flee from his creditors and by 1841 he found it necessary to return to his borough seat; a situation which Graham felt honour bound to comply. In the 1841 general election Robert Williams (1811–1890) gave up his seat and influence to Graham who returned to parliament unopposed as member for the Dorchester constituency. When Robert Peel became Prime Minister he rewarded Graham with a cabinet position of Home Secretary.