James I, King of Scotland from 1406, was the son of King Robert III and Annabella Drummond. He was the last of three sons. By the time he was eight, both of his elder brothers were dead—Robert had died in infancy but David, Duke of Rothesay died suspiciously in Falkland Castle while being detained by his uncle, Robert, Duke of Albany. Although parliament exonerated Albany, fears for James's safety grew during the winter of 1405–1406 and plans were made to send him to France. In February 1406, James was accompanying nobles close to his father when they clashed with supporters of Archibald, 4th Earl of Douglas, forcing the prince to take refuge in the castle of the Bass Rock, a small islet in the Firth of Forth. He remained there until mid-March, when he boarded a vessel bound for France, but on 22 March while off the English coast, pirates captured the ship and delivered James to Henry IV of England. Two weeks later, on 4 April the ailing Robert III died, and the 12-year-old uncrowned King of Scots began his 18-year detention.
James was given a good education at the English Court, where he developed respect for English methods of governance and for Henry V to the extent that he served in the English army against the French during 1420–1421. The Scottish King's cousin, Murdoch Stewart, Albany's son, a captive in England since 1402, was traded for Henry Percy, Earl of Northumberland in 1416. Eight more years passed before James was ransomed, by which time Murdoch had succeeded his father to the dukedom and the governorship of Scotland. James married Joan Beaufort, daughter of the Earl of Somerset in February 1424 shortly before his release in April when they journeyed to Scotland. This was not altogether a popular re-entry to Scottish affairs, since James had fought on behalf of Henry V and at times against Scottish forces in France. Noble families would now not only have to pay increased taxes to cover the £40,000 ransom repayments but would also have to provide hostages as security. Despite this, James held qualities that were admired. The contemporary Scotichronicon by Walter Bower described James as excelling at sport and appreciative of literature and music. Unlike his father and grandfather he did not take mistresses, but had many children by his consort, Queen Joan. The King had a strong desire to impose law and order on his subjects, but applied it selectively at times.
To bolster his authority and secure the position of the crown, James launched pre-emptive attacks on some of his nobles beginning in 1425 with his close kinsmen the Albany Stewarts resulting in the execution of Duke Murdoch and his sons. In 1428 James detained Alexander, Lord of the Isles, while attending a parliament in Inverness. Archibald, 5th Earl of Douglas, was arrested in 1431, followed by George, Earl of March, in 1434. The plight of the ransom hostages held in England was ignored and the repayment money was diverted into the construction of Linlithgow Palace and other grandiose schemes.
In August 1436, James failed humiliatingly in his siege of the English-held Roxburgh Castle and then faced an ineffective attempt by Sir Robert Graham to arrest him at a general council. James was murdered at Perth on the night of 20/21 February 1437 in a failed coup by his uncle and former ally Walter Stewart, Earl of Atholl.