James was the son of Mary, Queen of Scots, and a great-great-grandson of Henry VII, King of England and Lord of Ireland, positioning him to eventually accede to all three thrones. James succeeded to the Scottish throne at the age of thirteen months, after his mother was compelled to abdicate in his favour. Four different regents governed during his minority, which ended officially in 1578, though he did not gain full control of his government until 1583. In 1603, he succeeded the last Tudor monarch of England and Ireland, Elizabeth I, who died without issue. He continued to reign in all three kingdoms for 22 years, a period known after him as the Jacobean era, until his death in 1625 at the age of 58. After the Union of the Crowns, he based himself in England (the largest of the three realms) from 1603, only returning to Scotland once in 1617, and styled himself "King of Great Britain and Ireland". He was a major advocate of a single parliament for England and Scotland. In his reign, the Plantation of Ulster and British colonisation of the Americas began.
At 57 years and 246 days, James's reign in Scotland was longer than those of any of his predecessors. He achieved most of his aims in Scotland but faced great difficulties in England, including the Gunpowder Plot in 1605 and repeated conflicts with the English Parliament. Under James, the "Golden Age" of Elizabethan literature and drama continued, with writers such as William Shakespeare, John Donne, Ben Jonson, and Sir Francis Bacon contributing to a flourishing literary culture. James himself was a talented scholar, the author of works such as Daemonologie (1597), The True Law of Free Monarchies (1598), and Basilikon Doron (1599). He sponsored the translation of the Bible into English that would later be named after him: the Authorised King James Version. Sir Anthony Weldon claimed that James had been termed "the wisest fool in Christendom", an epithet associated with his character ever since. Since the latter half of the 20th century, historians have tended to revise James's reputation and treat him as a serious and thoughtful monarch. He was strongly committed to a peace policy, and tried to avoid involvement in religious wars, especially the Thirty Years' War (1618–1648) that devastated much of Central Europe. He tried but failed to prevent the rise of hawkish elements in the English Parliament who wanted war with Spain.
James was the only son of Mary, Queen of Scots, and her second husband, Henry Stuart, Lord Darnley. Both Mary and Darnley were great-grandchildren of Henry VII of England through Margaret Tudor, the older sister of Henry VIII. Mary's rule over Scotland was insecure, and she and her husband, being Roman Catholics, faced a rebellion by Protestant noblemen. During Mary's and Darnley's difficult marriage, Darnley secretly allied himself with the rebels and conspired in the murder of the Queen's private secretary, David Rizzio, just three months before James's birth.
James was born on 19 June 1566 at Edinburgh Castle, and as the eldest son and heir apparent of the monarch automatically became Duke of Rothesay and Prince and Great Steward of Scotland. He was baptised "Charles James" or "James Charles" on 17 December 1566 in a Catholic ceremony held at Stirling Castle. His godparents were Charles IX of France (represented by John, Count of Brienne), Elizabeth I of England (represented by the Earl of Bedford), and Emmanuel Philibert, Duke of Savoy (represented by ambassador Philibert du Croc). Mary refused to let the Archbishop of St Andrews, whom she referred to as "a pocky priest", spit in the child's mouth, as was then the custom. The subsequent entertainment, devised by Frenchman Bastian Pagez, featured men dressed as satyrs and sporting tails, to which the English guests took offence, thinking the satyrs "done against them".
James's father, Darnley, was murdered on 10 February 1567 at Kirk o' Field, Edinburgh, perhaps in revenge for the killing of Rizzio. James inherited his father's titles of Duke of Albany and Earl of Ross. Mary was already unpopular, and her marriage on 15 May 1567 to James Hepburn, 4th Earl of Bothwell, who was widely suspected of murdering Darnley, heightened widespread bad feeling towards her. In June 1567, Protestant rebels arrested Mary and imprisoned her in Loch Leven Castle; she never saw her son again. She was forced to abdicate on 24 July 1567 in favour of the infant James and to appoint her illegitimate half-brother, James Stewart, Earl of Moray, as regent.