The second surviving son of Charles I, he ascended the throne upon the death of his brother, Charles II. Members of Britain's Protestant political elite increasingly suspected him of being pro-French and pro-Catholic and of having designs on becoming an absolute monarch. When he produced a Catholic heir, a son called James Francis Edward, leading nobles called on his Protestant son-in-law and nephew William III of Orange to land an invasion army from the Dutch Republic, which he did in the Glorious Revolution of 1688. James fled England (and thus was held to have abdicated). He was replaced by his Protestant eldest daughter Mary II and her husband William III. James made one serious attempt to recover his crowns from William and Mary when he landed in Ireland in 1689. After the defeat of the Jacobite forces by the Williamites at the Battle of the Boyne in July 1690, James returned to France. He lived out the rest of his life as a pretender at a court sponsored by his cousin and ally, King Louis XIV.
James is best known for his struggles with the English Parliament and his attempts to create religious liberty for English Roman Catholics and Protestant nonconformists, against the wishes of the Anglican establishment. This tension made James's four-year reign a struggle for supremacy between Parliament and the Crown, resulting in his deposition, the passage of the Bill of Rights, and the accession of his daughter and her husband as queen and king.
James, the second surviving son of King Charles I and his wife, Henrietta Maria of France, was born at St. James's Palace in London on 14 October 1633. Later that same year, he was baptised by William Laud, the Anglican Archbishop of Canterbury. He was educated by private tutors, along with his brother, the future King Charles II, and the two sons of the Duke of Buckingham, George and Francis Villiers. At the age of three, James was appointed Lord High Admiral; the position was initially honorary, but would become a substantive office after the Restoration, when James was an adult.
The King's disputes with the English Parliament grew into the English Civil War. James accompanied his father at the Battle of Edgehill, where he narrowly escaped capture by the Parliamentary army. He subsequently stayed in Oxford, the chief Royalist stronghold, where he was made a M.A. by the University on 1 November 1642 and served as colonel of a volunteer regiment of foot. When the city surrendered after the siege of Oxford in 1646, Parliamentary leaders ordered the Duke of York to be confined in St. James's Palace. Disguised as a woman, he escaped from the Palace in 1648 with the help of Joseph Bampfield, and crossed the North Sea to The Hague.