Gilbert Burnet (1643-1715), English bishop and historian, was born in Edinburgh on the 18th of September 1643, of an ancient and distinguished Scottish house. He was the youngest son of Robert Burnet (1592-1661), who at the Restoration became a lord of session with the title of Lord Crimond. Robert Burnet had refused to sign the Scottish Covenant, although the document was drawn up by his brother-in-law, Archibald Johnstone, Lord Warristoun. He therefore found it necessary to retire from his profession, and twice went into exile. He disapproved of the rising of the Scots, but was none the less a severe critic of the government of Charles I. and of the action of the Scottish bishops. This moderate attitude he impressed on his son Gilbert, whose early education he directed. The boy entered Marischal College at the age of nine, and five years later graduated M.A. He then spent a year in the study of feudal and civil law before he resolved to devote himself to theology. He became a probationer for the Scottish ministry in 1661 just before episcopal government was re-established in Scotland. His decision to accept episcopal orders led to difficulties with his family, especially with his mother, who held rigid Presbyterian views.

From this time dates his friendship with Robert Leighton (1611-1684), who greatly influenced his religious opinions. Leighton had, during a stay in the Spanish Netherlands, assimilated something of the ascetic and pietistic spirit of Jansenism, and was devoted to the interests of peace in the church. Burnet wisely refused to accept a benefice in the disturbed state of church affairs, but he wrote an audacious letter to Archbishop Sharp asking him to take measures to restore peace. Sharp sent for Burnet, and dismissed his advice without apparent resentment. He had already made valuable acquaintances in Edinburgh, and he now visited London, Oxford and Cambridge, and, after a short visit to Edinburgh in 1663, when he sought to secure a reprieve for his uncle Warristoun, he proceeded to travel in France and Holland. At Cambridge he was strongly influenced by the philosophical views of Ralph Cudworth and Henry More, who proposed an unusual degree of toleration within the boundaries of the church and the limitations imposed by its liturgy and episcopal government; and his intercourse in Holland with foreign divines of different Protestant sects further encouraged his tendency to latitudinarianism.

When he returned to England in 1664 he established intimate relations with Sir Robert Moray and with John Maitland, earl and afterwards first duke of Lauderdale, both of whom at that time advocated a tolerant policy towards the Scottish covenanters. Burnet became a member of the Royal Society, of which Moray was the first president. On his father's death he had been offered a living by a relative, Sir Alexander Burnet, and in 1663 the living of Saltoun, East Lothian, had been kept open for him by one of his father's friends. He was not formally inducted at Saltoun until June 1665, although he had served there since October 1664. For the next five years he devoted himself to his parish, where he won the respect of all parties. In 1666 he alienated the Scottish bishops by a bold memorial (printed in vol. ii. of the Miscellanies of the Scottish Historical Society), in which he pointed out that they were departing from the custom of the primitive church by their excessive pretensions, and yet his attitude was far too moderate to please the Presbyterians. In 1669 he resigned his parish to become professor of divinity in the university of Glasgow, and in the same year he published an exposition of his ecclesiastical views in his Modest and Free Conference between a Conformist and a Nonconformist (by "a lover of peace"). He was Leighton's right hand in the efforts at a compromise between the episcopal and the presbyterian principle.

Meanwhile he had begun to differ from Lauderdale, whose policy after the failure of the scheme of "Accommodation" moved in the direction of absolutism and repression, and during Lauderdale's visit to Scotland in 1672 the divergence rapidly developed into opposition. He warily refused the offer of a Scottish bishopric, and published in 1673 his four "conferences," entitled Vindication of the Authority, Constitution and Laws of the Church and State of Scotland, in which he insisted on the duty of passive obedience. It was partly through the influence of Anne (d. 1716), duchess of Hamilton in her own right, that he had been appointed at Glasgow, and he made common cause with the Hamiltons against Lauderdale. The duchess had made over to him the papers of her father and uncle, from which he compiled the Memoirs of the Lives and Actions of James and William, dukes of Hamilton and Castleherald. In which an Account is given of the Rise and Progress of the Civil Wars of Scotland ... together with many letters ... written by King Charles I. (London, 1677; Univ. Press, Oxford, 1852), a book which was published as the second volume of a History of the Church of Scotland, Spottiswoode's History forming the first. This work established his reputation as an historian.

Meanwhile he had clandestinely married in 1671 a cousin of Lauderdale, Lady Margaret Kennedy, daughter of John Kennedy, 6th earl of Cassilis, a lady who had already taken an active part in affairs in Scotland, and was eighteen years older than Burnet. The marriage was kept secret for three years, and Burnet renounced all claim to his wife's fortune.

Lauderdale's ascendancy in Scotland and the failure of the attempts at compromise in Scottish church affairs eventually led Burnet to settle in England. He was favourably received by Charles II. in 1673, when he went up to London to arrange for the publication of the Hamilton Memoirs, and he was treated with confidence by the duke of York. On his return to Scotland Lauderdale refused to receive him, and denounced him to Charles II. as one of the chief centres of Scottish discontent. Burnet found it wiser to retire to England on the plea of fulfilling his duties as royal chaplain. Once in London he resigned his professorship (September 1674) at Glasgow; but, although James remained his friend, Charles struck him off the roll of court chaplains in 1674, and it was in opposition to court influence that he was made chaplain to the Rolls Chapel by the master, Sir Harbottle Grimston, and appointed lecturer at St Clement's. He was summoned in April 1675 before a committee of the House of Commons to give evidence against Lauderdale, and disclosed, without reluctance according to his enemies, confidences which had passed between him and the minister.