Godolphin married Margaret Blagge, daughter of Thomas Blagge, the pious lady whose life was written by Evelyn in his book The Life of Mrs Godolphin, on 16 May 1675. She died in childbirth bearing his only son, Francis, in 1678, and Godolphin never remarried.
While holding this office he for several years continued, in conjunction with John Churchill, 1st Duke of Marlborough, a secret correspondence with James II, and is said to have disclosed to James intelligence regarding the intended expedition against Brest. Godolphin was not only a Tory by inheritance, but was thought to have a romantic admiration for the wife of James II. After Fenwick’s confession in 1696 regarding the attempted assassination of William III, Godolphin, who was compromised, tendered his resignation; but when the Tories came into power in 1700, he was again appointed lord treasurer and retained office for about a year. Though not technically a favourite with Queen Anne, he was, after her accession, appointed to his old office, on the strong recommendation of Marlborough. He also in 1704 received the honour of knighthood, and in December 1706 he was created Viscount Rialton and Earl of Godolphin.
Though a Tory, he had an active share in the intrigues which gradually led to the predominance of the Whigs in alliance with Marlborough. The influence of the Marlboroughs with the queen was, however, gradually supplanted by that of Abigail Masham and Robert Harley, Earl of Oxford, and with the fortunes of the Marlboroughs those of Godolphin were indissolubly united. The services of both were so appreciated by the nation that they were able for a time to regard the loss of the queen’s favour with indifference, and even in 1708 to procure the expulsion of Harley from office; but after the Tory reaction which followed the impeachment of Henry Sacheverell, who abused Godolphin under the name of Volpone, the queen made use of the opportunity to get rid of Marlborough by abruptly dismissing Godolphin from office on 7 August 1710.
Godolphin owed his rise to power and his continuance in it under four sovereigns to his financial wizardry; he received support from Marlborough mainly because Marlborough recognised that for the continuance of England's foreign wars his financial abilities were an indispensable necessity. He is said to have been cool, reserved and cautious, with more concern for his own welfare than for political considerations. Nevertheless, he took little advantage of his opportunities for personal gain, and in spite of his well-known fondness for horse racing, cards, and cockfighting, his style of living was unostentatious. When he died, his estate was more than £12,000.