He was born in Barbados, where his father was colonel of militia, in 1793, and was educated at Oriel College, Oxford.
He took his B.A. degree in 1813 with first-class honours in both classics and mathematics and in the following year, he obtained the chancellor's prize for a Latin essay. Shortly afterwards, he was elected a fellow of Oriel College. Election to these fellowships was by special examination intended to select the best possible minds and Hampden became a member of the group known as the "Noetics" who were Whigs in politics and freely critical of traditional religious orthodoxy. He was reputedly one of the milder but most learned of them. John Keble and Thomas Arnold were also fellows during this period. He left the university in 1816 and held successively a number of curacies. In 1827 he published Essays on the Philosophical Evidence of Christianity, followed by a volume of Parochial Sermons illustrative of the Importance of the Revelation of God in Jesus Christ (1828).
In 1829 Hampden returned to Oxford and in May 1830 became one of the tutors at Oriel where a disagreement about the tutors' duties led to John Henry Newman, Hurrell Froude, and Robert Wilberforce being relieved of their duties. Hampden was chosen to deliver the prestigious Bampton Lectures for 1832 in which he attempted to disentangle the original truth of Christianity from later accretions and superstitions, particularly scholastic philosophy. His thought was obscure and ambiguous. The lectures were dull and while, at the time, some people thought he had committed himself to a heretical view of the Trinity akin to Socinianism and Sabellianism, serious questioning only started after the publication of his Observations on Religious Dissent in 1834 and wide-ranging outrage in 1836 after his nomination to the Regius Professorship of Divinity. In 1833 he moved from a tutorship at Oriel to become Principal of St Mary Hall and in 1834 he was appointed White's Professor of Moral Philosophy without any adverse comment in preference to Newman. It was also recognised by everyone that Hampden was a virtuous man who had done much for the undergraduate members of St. Mary Hall.
The years 1815–1914 were a time of radical social and political change in which religion played a significant role. Politically the Church of England was overwhelmingly Tory and opposed to political reform. At the start of this period, many Anglicans equated the religious well–being of the country as that of their own church while Protestant and Catholic dissidents suffered under discriminatory religious legislation. The Whig party and its reforming programme relied heavily on the support of Protestant dissidents who saw the parish priest as "the black recruiting–sergeant against us". Feelings ran very high, particularly between 1825 and 1850. Despite the recent, partial relief afforded by the repeal of the Test and Corporation Acts and the Roman Catholic Relief Act 1829 non-Anglicans still suffered from serious discrimination. The tensions had been made much worse by the action of 21 of bishops in voting against the reform of Parliament in 1831 while only 3 voted in favour. Had they all voted in favour the Bill would have passed.
Oxford and Cambridge Universities played a central role in the Church of England. They were wholly Anglican institutions. At Oxford, students had to subscribe to the Thirty-Nine Articles of the Church of England as part of the admission process; while at Cambridge no one could graduate without doing so. They were the principal nurseries of Anglican clergy and extremely influential in the country in general.
The passing of the Reform Bill in 1832 did little to ease the tensions since the widened franchise produced a reforming parliament in which the more radical members obviously had ecclesiastical abuses in their sights as part of a very wide-ranging programme. Many dissenters campaigned for the disestablishment of the Church of England and the Government's decision to merge ten dioceses of the Church of Ireland with their neighbours was seen as a serious threat to the Church of England when carried into effect by the Church Temporalities (Ireland) Act 1833. It was the direct cause of John Keble's famous assize sermon on "National Apostasy" at Oxford the following year and this in its turn led to the Tractarian Movement. By 1834 the tensions between dissenters and churchmen had reached unprecedented levels, probably because the dissenters sensed that the Church of England would cling to its remaining privileges.
In the summer of 1834 a bill to abolish subscription on admission to a university or on taking any degree rather than requiring subscription to the 39 Articles of the Church of England was rejected by the House of Lords. Hampden entered the public arena in August by publishing Observations on Religious Dissent in support of the admission of non-Anglicans to Oxford University on the strength of a simple declaration of faith. Even so, urged by the Duke of Wellington (recently elected Chancellor), on November 10 the heads of the Oxford Colleges recognised that public feeling was opposed to making schoolboys subscribe to the Articles on matriculation and by a single vote agreed to abolish the practice. Hampden then produced a second edition of the pamphlet and sent a copy to John Henry Newman who, while recognising its "tone of piety" regretted that the arguments of the work tended "altogether to make shipwreck of the Christian faith". Debate via published works and personal acrimony between the two scholars continued for two years.
The decision of the heads of Colleges was rescinded but revived in March of the following year when a motion to that effect was roundly defeated in Convocation by 459 votes to 57 where all Masters of Arts whether resident or not had the right to vote and all types of traditionalist MAs combined to defeat it. A few months later, Lord Radnor introduced a parliamentary bill with the same object and Hampden was the only resident to speak out openly in favour. He became the chief target of a book on the subscription issue edited by Newman who accused Hampden of being a socinian in it.
Two years later, the Regius Professor of Divinity died suddenly and the Whig Prime Minister, Lord Melbourne, offered the post to Hampden. (The only other clergyman from Oxford who in Whig eyes deserved preferment was Thomas Arnold of Rugby but he was already regarded as a heretic in conservative church circles). The news leaked out before the appointment was confirmed and opposition was quickly organised in the hope of preventing it. It came from three different groups. A few high churchmen and evangelicals genuinely believed him to hold heretical views and therefore to be unfit to train future clergymen; a large number of Oxford graduates resented the favour shown to the author of Observations on Religious Dissent; and a large number of Tory supporters throughout the country seized the chance of harrying a Whig government. Despite all the objections, Melbourne pushed the nomination through and Hampden became the Regius Professor of Divinity.
After the subsidence of the controversy, he published a Lecture on Tradition, which passed through several editions, and a volume on The Thirty-nine Articles of the Church of England.
Hampden's nomination by Lord John Russell to the vacant see of Hereford in December 1847 was again the signal for organised opposition; and his consecration in March 1848 took place in spite of a remonstrance by many of the bishops, and the resistance of John Merewether, the Dean of Hereford, who voted against the election.
As bishop of Hereford Dr Hampden made no change in his long-formed habits of studious seclusion, and though he showed no special ecclesiastical activity or zeal, the diocese certainly prospered in his charge. Among the more important of his later writings were the articles on Aristotle, Plato and Socrates, contributed to the eighth edition of the Encyclopædia Britannica, and afterwards reprinted with additions under the title of The Fathers of Greek Philosophy (Edinburgh, 1862). In 1866 he had a paralytic seizure, and died in London on 23 April 1868.
His daughter, Henrietta Hampden, published Some Memorials of R. D. Hampden in 1871.