David II, son of King Robert the Bruce by his second wife, Elizabeth de Burgh (d. 1327), was born at Dunfermline Palace, Fife. He was married on 17 July 1328 to Joan of the Tower, daughter of Edward II of England and Isabella of France.
David became king of Scotland upon the death of his father on 7 June 1329. He was crowned at Scone in November 1331.
Owing to the victory of Edward III of England and his protégé, Edward Balliol, at Halidon Hill in July 1333, David and his queen were sent for safety into France, reaching Boulogne in May 1334. Meanwhile his representatives had obtained the upper hand in Scotland, and David was thus enabled to return to his kingdom in June 1341, when he took the reins of government into his own hands. In 1346 under the terms of the Auld Alliance, he invaded England in the interests of France, but was defeated and taken prisoner at the Battle of Neville’s Cross on 17 October 1346, and remained in England for eleven years, living principally in London and at Odiham in Hampshire. His imprisonment was not a rigorous one, and negotiations for his release were soon begun. Eventually, in October 1357, after several interruptions, a treaty was signed at Berwick by which the Scottish estates undertook to pay 100,000 marks as a ransom for their king.
David returned at once to Scotland; but owing to the poverty of the kingdom it was found impossible to raise the ransom. A few instalments were paid, but the king sought to get rid of the liability by offering to make Edward III, or one of his sons, his successor in Scotland. In 1364 the Scottish parliament indignantly rejected a proposal to make Lionel, Duke of Clarence, the next king; but David negotiated secretly with Edward III over this matter, after he had suppressed a rising of some of his unruly nobles.
The king died in Edinburgh Castle in 1371. His second wife was Margaret Drummond, widow of Sir John Logie, whom he divorced in 1369. At the time of his death he was planning to marry his mistress Agnes Dunbar, daughter of Agnes Dunbar, 4th Countess of Moray. He left no children and was succeeded by his nephew, Robert II.