James I lived from 10 December 1394 to 21 February 1437 and was King of Scotland from 4 April 1406 until 21 February 1437. However, he was King in name only until early 1424. James was the younger son of Robert III of Scotland. His elder brother David Stewart, 1st Duke of Rothesay had been killed by their uncle, Robert, Duke of Albany, and while escaping, the 12 year old James had hidden at Dirleton Castle and on Bass Rock before sailing towards sanctuary on the continent. En route he had been captured by pirates who had handed him over to Henry IV of England. The wider picture in Scotland at the time is set out in our Historical Timeline.
Robert III had died on hearing of James' capture, making him James I of Scotland. However as James was in captivity, the Duke of Albany was made Governor and Regent of Scotland by Parliament. And although the Duke of Albany negotiated the release of his own son Murdoch, who had been captured with James, for some reason the negotiations about James' own release simply never went anywhere.
James had a secure and well educated upbringing, largely at Windsor Castle. In 1423 James, by now aged 29, fell in love with Lady Joan Beaufort, a close relative of King Henry VI of England. Robert, Duke of Albany had died in 1420, to be replaced by his son Murdoch as Governor and Regent, and it seems likely that with James marrying into the family it was the English King Henry VI who took the initiative in negotiating a ransom for James's return under the terms of the Treaty of London of 4 December 1423.
James and Joan married in London on 12 February 1424. They then travelled north, and James I was finally crowned at Scone on 21 May 1424. He had already moved to exile members of the Duke of Albany's family who might prove a threat to his reign: imprisoning one of Murdoch's sons on Bass Rock prior to deporting him to France. After an ill-judged revolt by another of Murdoch's sons in 1425, James I had much of the remainder of his uncle's arm of the Stewart family executed.
After spending his formative years in England, James swept into a Scotland in chaos with a reforming zeal that made him many enemies among those with vested interests: people who had done well in the comfortable and corrupt Scotland run by the Duke of Albany. Amongst his many other reforms he introduced what is now the Court of Session.
Those dissatisfied with James' rule decided to progress their cause by challenging his right to the throne. James' grandfather, Robert II, had had to remarry his first wife because of doubts about the validity of their first marriage. This in turn had raised doubts that Robert III, James' father, could be illegitimate. Supporters of the children of Robert II's second marriage, who were undoubtedly legitimate, rose up against James. James took steps to suppress the challenge with increasing ruthlessness.
But not enough. Early on 21 February 1437, plotters supporting the claims of Walter, Earl of Atholl, a son of Robert II's second marriage, broke into the Blackfriars monastery in Perth where James was staying with Queen Joan. James tried to escape by climbing down a sewer that exited onto the tennis court where he had spent many of his days. Ironically he had instructed that the outlet be blocked the previous day to prevent tennis balls being lost. James was cornered in the sewer and killed by Sir Robert Graham. Queen Joan, though injured, escaped, and took their young son James - now James II - for safety to Stirling Castle.