He was born the second son of Duncan Forbes of Culloden and Bunchrew, near Inverness, by his wife, Mary Innes. Duncan and his elder brother, John, were sent to the grammar school of Inverness. Here, according to his first biographer, who preserves some details omitted from more decorous records, the brothers became known as 'the greatest boozers in the north' from their convivial prowess. Duncan drank freely until, about 1725, delicate health compelled greater temperance, for a period at least. The same writer states that on the occasion of his mother's funeral in 1716, Forbes and the rest of the party drank so hard that when they went to the burial-place they left the body behind. On his father's death in 1704 Forbes's elder brother took the estate and Forbes inherited a small sum of money which he lost in mercantile speculations. He then went to study law at Edinburgh, under John Spottiswood, but, finding the teaching inadequate, proceeded in 1705 to Leyden. He had been present in March 1705 at the remarkable trial of Captain Thomas Green for piracy. The execution of a man afterwards proved to be innocent made a deep impression upon him, as appears from a remarkable passage in his speech in the House of Commons on the Porteous case. At Leyden he studied both the civil law and oriental languages. He returned to Scotland in 1707. Soon after his return he married Mary, daughter of Hugh Rose, twelfth baron of Kilravock, near Culloden. She died early, though the exact date is not known, certainly before 1717.
Duncan was admitted an advocate 26 July 1709, and was soon afterwards appointed sheriff of Midlothian. This appointment was due to the favour of John Campbell, 2nd Duke of Argyll. The duke's brother, Lord Islay (afterwards third duke of Argyll), was also a warm friend. Forbes, it is said, managed the duke's estates without accepting a fee, though he might have had £500 or £600 a year for his services. He took an active part in politics on the whig side. On a canvass for his brother on one occasion his liberality in distributing claret and his vigour in consuming his own share carried the election. During the Jacobite Rising of 1715 he distinguished himself by loyal exertions against the rebels. His brother John joined the famous Simon Fraser, 11th Lord Lovat, at Stirling, and accompanied him to Inverness. The brothers had raised forces to support the government. Culloden and Kilravock (the house of Duncan's father-in-law) were garrisoned; and, in combination with Lovat, they threatened Inverness, which surrendered just before the battle of Sheriffmuir. Duncan Forbes was rewarded by the office of depute-advocate, upon which he entered 12 March 1716. He accepted the office with great reluctance. He was expected, as he thought, to take part in the trial of some of the rebels in Carlisle. The law which provided that trials should take place in the counties in which the treasonable actions were alleged to have taken place was suspended. Forbes regarded this as unjust. He was not called upon to prosecute. He even collected money to support the Scottish prisoners at Carlisle. He wrote an anonymous letter to Sir Robert Walpole, protesting against severity to the rebels. His sentiments exposed him to suspicion of Jacobite leanings.
In 1721–2 Forbes was M.P. for Ayr burgh. In 1722 he stood against Alexander Gordon of Ardoch for the Inverness Burghs. Gordon was returned, but upon a petition Forbes was declared to be duly elected. He had already been frequently employed as counsel in appeals to the House of Lords, and he made acquaintance with many eminent statesmen, and, it is said, with Alexander Pope, Dr. Arbuthnot, and their circle. He knew James Thomson, who apostrophises him in 'Autumn,' and patronised Thomas Ruddiman and other men of letters. On 29 May 1725 he was appointed Lord Advocate in succession to Robert Dundas of Arniston, and is said to have distinguished himself by his humanity. His salary was only £500 or £600 a year, and he had to discharge many of the duties previously attached to the office of secretary of state for Scotland, which was suspended during the years 1725–1731, and finally abolished in 1746.
Forbes had to take active measures during the troubles which arose from the extension of the English system of taxation to Scotland. A riot took place at Glasgow in 1725, when Shawfield, the house of Daniel Campbell, M.P. for Glasgow, who had supported the malt tax, was sacked by the mob. Forbes at once accompanied a force, commanded by General Wade, which marched upon Glasgow. Forbes, as lord advocate, ordered the arrest of the Glasgow magistrates for their negligence, and brought them, with some of the rioters, to Edinburgh. They were liberated after a short time. The same act provoked a strike of the Edinburgh brewers, who had been ordered by the court of session to sell their ale at a fixed price. The court, at Forbes's request, ordered them to continue their trade, and threatened to commit them to prison. After a sharp dispute the brewers yielded, and Forbes received warm thanks from Walpole. He afterwards proposed very stringent regulations for the protection of the revenue. Forbes was a tenant of the infamous Francis Charteris, at the old manor house of Stoneyhill, near Edinburgh. The anonymous biographer says that he defended Charteris, who died in 1732. In gratitude for this and for some other reasons Charteris left him £1,000 and the life-rent of Stoneyhill.
In 1735 Forbes succeeded to the family estates on the death of his brother, and undertook agricultural improvements at Bunchrew, a small property near Culloden. In 1737 he took a conspicuous part in opposing the bill inflicting penalties upon the city of Edinburgh for the Porteous Riots. He made two firm, though temperate, speeches on 16 May and 9 June. The Duke of Argyll and all the Scottish members took the same side, and the bill was reduced to a measure 'for making the fortune of an old cook-maid' (Mrs. Porteous), and even then carried by a casting vote. Though Forbes had thus opposed government while holding an official position, he was immediately appointed President of the Court of Session, and took his seat 21 June 1737. He soon gained a very high character as a judge. Many of the cases which he decided are given in Kilkerran's reports. He immediately made regulations for improving the despatch of business, and reported in February 1740 that all arrears had been cleared off. He enforced respect for his office upon all classes, and at the same time laboured at other incidental tasks. He made an elaborate investigation, at the request of the House of Lords, into the origin and history of Scottish peerages. He tried hard to convert various friends to a favourite crotchet. He held that the commercial prosperity of the country, otherwise in a satisfactory state, was threatened by the 'excessive use of tea.' He proposed to limit the use of tea by all persons with an income under £50 a year. But memorials to the solicitor-general, Murray (afterwards Lord Mansfield), and other eminent persons met no response.
The approach of the Jacobite Rising of 1745 brought more serious difficulties. Forbes strongly, but vainly, urged preventive measures, and especially the plan, afterwards adopted by Chatham, of the formation of highland regiments. In August 1745 he went to Inverness and corresponded with many of the highland leaders, especially Lovat, who had been known to his father, intimate with his brother John, and had kept up a friendly correspondence with Duncan Forbes since 1715. Forbes had assisted Lovat in some of his complex lawsuits. Forbes now endeavoured to detach Lovat from the Pretender's cause. Lovat's clan made a sudden raid upon Culloden, which was fortified and garrisoned; but Lovat disavowed his complicity, and for a time kept to his mask. Forbes was meanwhile left, by Sir John Cope's departure to the south in September, the sole representative of government in the north of Scotland. Blank commissions were sent to him for distribution among the loyal clans. After the battle of Prestonpans his position became very difficult. He was joined by the Earl of London, and they raised a force of two thousand men. When the highlanders moved northwards in the beginning of 1746 Forbes and Loudon retreated into Ross-shire, and ultimately to Skye, where they heard of the battle of Culloden. Forbes then returned to Inverness. He protested against the cruelties of the Duke of Cumberland, who showed his spirit by calling Forbes 'that old woman who talked to me about humanity'. Forbes had been obliged to raise sums upon his own credit. 'Small sums' amounted to £1,500, and he advanced besides three times his annual rents. The consequent anxiety and the labours which he had gone through seem to have broken his health.
He died 10 December 1747. He is buried in Greyfriars Kirkyard in central Edinburgh. The grave lies south of the church and is marked by a stone slab added to the unmarked grave in the 1930s by the Saltire Society.
A statue by Louis-Francois Roubiliac was raised to him in the Parliament House, Edinburgh by the Faculty of Advocates in 1752.
He left an only son, John, who was a friend of Thomson's, and is said to be described as the 'joyous youth' who kept the Castle of Indolence in a 'gay uproar.' He entered the army, served at the Battle of Fontenoy, and after his father's death lived in retirement at Stradishall, Suffolk, slowly paying off the encumbrances upon his paternal estates.
Forbes is also known as the author of some theological works. As lord advocate he had been engaged in 1728 in the prosecution of James Carnegie of Finhaven, who had been grossly insulted during one of the usual convivial parties at a funeral by a Mr. Bridgeton, and, trying to stab Bridgeton, had killed Lord Strathmore. Carnegie was acquitted after long arguments, in which frequent reference was made to the Mosaic law and Jewish cities of refuge. Forbes, according to his anonymous biographer, was so much impressed by these arguments that he set to work to learn Hebrew. The result of his studies appeared in three treatises, which were published soon after his death as his 'Works, now first collected' (undated). They contain:A Letter to a Bishop, concerning some important Discoveries in Religion and Theology, 1732 (an exposition of Hutchinson's ‘Moses's Principia’).
Some Thoughts concerning Religion, natural and revealed … tending to show that Christianity is, indeed, very near as old as the Creation, 1735 (an answer to Tindal's ‘Christianity as Old as the Creation,’ chiefly from prophecy).
Reflections on the Sources of Incredulity with respect to Religion (posthumous).
The two first were translated into French by Charles Francois Houbigant in 1769; but, it is said, 'the solidity of a Scottish lawyer could not be expected to suit with the vivacity of French reasoners.' Another peculiarity perhaps had more importance. Forbes was a follower of the fanciful school founded by John Hutchinson, and afterwards represented by Bishop Horne, Jones of Nayland, Parkhurst, and others, with which his translator seems to have been in sympathy. His piety was superior to his scholarship, but his books show an attractive enthusiasm and seriousness. Warburton in 1750 (Letters, 2nd edition, p. 40) recommends the posthumous work on incredulity as 'a little jewel. I knew and venerated the man,' he adds; 'one of the greatest that ever Scotland bred, both as a judge, a patriot, and a Christian.' Though Warburton is not a safe critic, he seems to have expressed a general opinion.