structural:expansion
Writer

Swift resided in Trim, County Meath, after 1700. He wrote many of his works during this period. In February 1702, Swift received his Doctor of Divinity degree from Trinity College Dublin. That spring he travelled to England and then returned to Ireland in October, accompanied by Esther Johnson—now 20—and his friend Rebecca Dingley, another member of William Temple's household. There is a great mystery and controversy over Swift's relationship with Esther Johnson, nicknamed "Stella". Many, notably his close friend Thomas Sheridan, believed that they were secretly married in 1716; others, like Swift's housekeeper Mrs Brent and Rebecca Dingley (who lived with Stella all through her years in Ireland), dismissed the story as absurd. Swift certainly did not wish her to marry anyone else: in 1704, when their mutual friend William Tisdall informed Swift that he intended to propose to Stella, Swift wrote to him to dissuade him from the idea. Although the tone of the letter was courteous, Swift privately expressed his disgust for Tisdall as an "interloper", and they were estranged for many years.

During his visits to England in these years, Swift published A Tale of a Tub and The Battle of the Books (1704) and began to gain a reputation as a writer. This led to close, lifelong friendships with Alexander Pope, John Gay, and John Arbuthnot, forming the core of the Martinus Scriblerus Club (founded in 1713).

Swift became increasingly active politically in these years. Swift supported the Glorious Revolution and early in his life belonged to the Whigs. As a member of the Anglican Church, he feared a return of the Catholic monarchy and "Papist" absolutism. From 1707 to 1709 and again in 1710, Swift was in London unsuccessfully urging upon the Whig administration of Lord Godolphin the claims of the Irish clergy to the First-Fruits and Twentieths ("Queen Anne's Bounty"), which brought in about £2,500 a year, already granted to their brethren in England. He found the opposition Tory leadership more sympathetic to his cause, and when they came to power in 1710, he was recruited to support their cause as editor of The Examiner. In 1711, Swift published the political pamphlet The Conduct of the Allies, attacking the Whig government for its inability to end the prolonged war with France. The incoming Tory government conducted secret (and illegal) negotiations with France, resulting in the Treaty of Utrecht (1713) ending the War of the Spanish Succession.

Swift was part of the inner circle of the Tory government, and often acted as mediator between Henry St John (Viscount Bolingbroke), the secretary of state for foreign affairs (1710–15), and Robert Harley (Earl of Oxford), lord treasurer and prime minister (1711–14). Swift recorded his experiences and thoughts during this difficult time in a long series of letters to Esther Johnson, collected and published after his death as A Journal to Stella. The animosity between the two Tory leaders eventually led to the dismissal of Harley in 1714. With the death of Queen Anne and the accession of George I that year, the Whigs returned to power, and the Tory leaders were tried for treason for conducting secret negotiations with France.

Swift has been described by scholars as "a Whig in politics and Tory in religion" and Swift related his own views in similar terms, stating that as "a lover of liberty, I found myself to be what they called a Whig in politics... But, as to religion, I confessed myself to be an High-Churchman." In his Thoughts on Religion, fearing the intense partisan strife waged over religious belief in seventeenth-century England, Swift wrote that "Every man, as a member of the commonwealth, ought to be content with the possession of his own opinion in private." However, it should be borne in mind that, during Swift's time period, terms like "Whig" and "Tory" both encompassed a wide array of opinions and factions, and neither term aligns with a modern political party or modern political alignments.

Also during these years in London, Swift became acquainted with the Vanhomrigh family (Dutch merchants who had settled in Ireland, then moved to London) and became involved with one of the daughters, Esther. Swift furnished Esther with the nickname " Vanessa " (derived by adding "Essa", a pet form of Esther, to the "Van" of her surname, Vanhomrigh), and she features as one of the main characters in his poem Cadenus and Vanessa. The poem and their correspondence suggest that Esther was infatuated with Swift and that he may have reciprocated her affections, only to regret this and then try to break off the relationship. Esther followed Swift to Ireland in 1714 and settled at her old family home, Celbridge Abbey. Their uneasy relationship continued for some years; then there appears to have been a confrontation, possibly involving Esther Johnson. Esther Vanhomrigh died in 1723 at the age of 35, having destroyed the will she had made in Swift's favour. Another lady with whom he had a close but less intense relationship was Anne Long, a toast of the Kit-Cat Club.