Boyle was born near Irvine, the son of the Hon Reverend Patrick Boyle of Shewalton (died 1874), son of John Boyle, 2nd Earl of Glasgow. His mother was Elizabeth Dunlop, daughter of Prof Alexander Dunlop.
He was educated in Law, first at St Andrews University (1787) and then Glasgow University (1789).
He became an advocate in 1793. He was Member of Parliament (MP) for Ayrshire from 1807 to 1811 and served as Solicitor General for Scotland during that period. In 1811, he was appointed a Senator of the College of Justice, with the judicial title Lord Boyle. He was Lord Justice Clerk from 1811 to 1841. He became a Privy Counsellor in 1820 and Lord Justice General from 1841 to 1852.
From 1815 to 1817 he served as Rector of Glasgow University.
In 1833 his address was listed as 28 Charlotte Square a highly prestigious address then and still, at the west end of Edinburgh's New Town.
Boyle married firstly, in 1804, Elizabeth Montgomery (died April 1822), daughter of Alexander Montgomery. They had several children, including Patrick Boyle, father of David Boyle, 7th Earl of Glasgow; and Alexander Boyle, a vice-admiral in the Royal Navy.
Boyle married secondly, in 1827, Catherine Campbell Smythe, daughter of David Smythe, Lord Methven. There were children from this marriage as well, including George David Boyle, who became Dean of Salisbury. Boyle died on 30 January 1853, aged 80. His second wife died in December 1880.
His daughter, Helen, married Charles Dalrymple Fergusson, Baronet of Kilkerran.
David Boyle inherited the family estate of Shewalton near Irvine, and was buried at Dundonald, South Ayrshire.Highland Society (1804)
Fellow of the Royal Society of Edinburgh (1820)