Cockburn was the third son of Sir James Cockburn, 8th Baronet and his second wife Augusta Anne Ayscough. His maternal grandfather was Francis Ayscough, Dean of Bristol. In 1853 Cockburn was made a baronetafter the death of his brother, George. In 1805, he married Elizabeth Peel, sister of Sir Robert Peel. She gave birth to three sons. James, the eldest, died in 1845 at the age of 38, Robert, the second son, died in 1850, aged 42, and George, the third son, died in 1850, aged 37. In 1830 Cockburn married Margaret Pearce, the daughter of a Colonel Pearce, but they had no children. Cockburn was educated at Charterhouse School and St John's College, Cambridge, graduating as twelfth wrangler in 1795 and receiving his MA in 1798 and DD in 1823. A fellow of St John's from 1796 to 1806, he was the first Christian Advocate of Cambridge University from 1803 to 1810. He was also a vocal scriptural geologist. William Cockburn was ordained in the Church of England as a deacon in 1800 and as priest the following year. In 1822 he became the Dean of York, the chief place of authority and dignity in the Cathedral and a position he held until his death in 1858. From 1832 onwards he was also rector of Kelston, Somerset, near Bristol, where he generally spent half the year. At age 84, Cockburn died in Kelston on 30 April 1858, after more than a year of growing infirmities.
Accused and acquitted of simony
In 1829 a fanatical Methodist set fire to the Minster causing considerable damage. As Dean, Cockburn was responsible to manage the repairs, which he did not do well. A second, accidental fire in 1840 again caused massive damage. Conflicts over the restoration work and Cockburn's unwise financial management finally reached a boiling point in 1841, when a York prebendary accused Cockburn of simony. Cockburn was foolishly frank, muddled his accounts, used repair funds for non-repair purposes, was intolerable to clear-thinking accountants and made too many independent decisions. Eventually, litigation involving the Archbishop of York led to a judgment deposing Cockburn from the Deanery. Cockburn appealed to the court of the Queen's Bench, which ruled "almost contemptuously" in favour of Cockburn, being particularly critical of the prosecuting attorney, Dr. Phillimore, Regius Professor of Civil Law at Oxford, for his ignorance of the applicable laws. The reputation of the Minster suffered badly from this affair. However, the whole city of York was pleased that Cockburn was still dean and tried to raise money to give him a token of their respect. When Cockburn discovered the plan, he insisted they not do it because it would foster unpleasant memories for everyone.
Modern critics
Historian Gillespie describes even "reasonably respectable" Cockburn's views as clerical "fulminations against science in general and all its works", and listed his works as among "clerical attacks on geology and uninformed attempts to frame theoretical systems reconciling the geological and scriptural records."