David Stewart, 1st Duke of Rothesay, lived from 24 October 1378 to 26 March 1402. Also known as Prince David, the Earl of Atholl and the Earl of Carrick, David Stewart was the oldest son of Robert III of Scotland and heir to the throne. The wider picture in Scotland at the time is set out in our Historical Timeline.
David Stewart was the oldest son of John, Earl of Carrick (who in turn was the oldest son of Robert II of Scotland) and his wife Annabella Drummond. At the time he was born his grandfather was still on the throne. In November 1384, Robert II - by now ill - was sidelined (in effect, deposed) in favour of John, Earl of Carrick, who became Guardian of the Kingdom. However, John was seriously injured by being kicked by a horse in 1388, something he never recovered from. Robert II took advantage of John's injury to appoint his younger son, Robert Stewart, as Guardian of the Kingdom in place of John.
On 19 April 1390, Robert II died and was succeeded by John, Earl of Carrick. Because of the bad press associated with the only King John that Scotland had ever had, John Balliol, the option of becoming "John II" was thought politically undesirable, so the Earl of Carrick became Robert III of Scotland instead. This is unlikely to have endeared him to his younger brother Robert Stewart, who had probably seen himself succeeding to the crown with that title.
It is also unlikely that Robert Stewart ever entirely released the reigns of power to his older brother Robert III, and for part of the latter's early reign still retained the title Guardian of Scotland. By 1398 Robert III's health was restricting him so much that the Scottish Parliament appointed his oldest son, David, 1st Duke of Rothesay, to be Lieutenant of the Kingdom and rule in his father's place: at the same time they made Robert Stewart, until then usually referred to as Earl of Fife, the 1st Duke of Albany. This arrangement seems to have been pushed through by Queen Annabella, specifically to ensure that her son, David Stewart, would succeed her husband, Robert III, to the throne.
Personal matters now intervened in international politics. In 1395, David married Elizabeth Dunbar, daughter of the Earl of March. However, the Papal dispensation needed because they were blood relatives was never gained, and in 1397 the couple separated. In 1400, David married Mary Douglas, daughter of Archibald Douglas, 3rd Earl of Douglas, arguably bigamously. The Earl of March responded by switching his allegiance to Henry IV of England, who then invaded Scotland, briefly capturing Edinburgh before retiring to England having made his point.
David found himself extremely unpopular in Scotland for provoking an English invasion. Then, following the death of his mother in 1401, he made matters worse by failing to consult his council (as he was required to do) before taking a series of decisions that were seen to threaten the positions of his nobles, especially his uncle, Robert Stewart, 1st Duke of Albany. Robert took advantage by arranging for David to be arrested and imprisoned in St Andrews Castle, before moving him to Falkland Palace. David died during his captivity at Falkland Palace, aged just 24, in March 1402. The General council of Scotland, largely under the control of Robert, concluded that David had died "by divine providence and not otherwise". The truth seems to be that David was starved to death at the command of his uncle, who then went on rule the kingdom for a further eighteen years thanks to the convenient imprisonment by the English of David's younger brother, the rightful James I of Scotland.