“I have been assured by a very knowing American of my acquaintance in London, that a young healthy child well nursed is at a year old a most delicious, nourishing, and wholesome food, whether stewed, roasted, baked, or boiled; and I make no doubt that it will equally serve in a fricassee, or a ragout.” These lines from Jonathan Swift’s Modest Proposal for Preventing the Children of Poor People from Being a Burthen to Their Parents or Country, and for Making Them Beneficial to the Publick of 1729 must be among the most startling in the history of literature. Swift aimed to prick an indifferent public into realising the extremity of poverty and suffering in Ireland, while mocking the “political arithmeticians” who treated this misery as a problem that could be solved by applying a mechanical calculus of costs and benefits. But no one – certainly not the suffering Irish people – escapes Swift’s ferocious scorn. At times, possessed by a cold and lucid rage, he seems to indict all of humankind.

Swift’s Modest Proposal has been read as a contribution to a genre that goes back to the Roman poet Juvenal, whose satires mocked the mores of his society using a variety of literary techniques extending from sarcasm to parody. There can be little doubt that Swift drew on this tradition. But we get closer to the heart of this strange work if we consider how the “deranged yet icily rational social pragmatist” – John Stubbs’s apt description of the persona that Swift adopts in the pamphlet – relates to Swift himself. What is shocking in the modest proposal is how the speaker can mount a defence of cannibalism on the basis of the most logical arguments. The pursuit of reason, Swift seems to be suggesting, can lead beyond the bounds of humanity and sanity.

The 18th century was full of political satirists such as Swift, who criticised prevailing policies in the interests of rational reform. But rather than pointing to any more reasonable way of conducting ourselves, the final effect of the Modest Proposal is to leave the human story a dark and senseless farce. Whatever else it may be, this is not mere satire. At bottom, Swift’s essay may have more in common with the absurdist comedies of Eugène Ionesco than with the familiar and somehow reassuring irony of the Roman poet. But this prompts the question: what kind of person could have produced such an extraordinary work?

Stubbs summarises Swift’s relatively modest beginnings with beautiful conciseness. “He was a near-abandoned, half-orphaned child. Although a Dubliner by birth, he would always insist he was English. He had English backing on this point, for Ireland belonged, thought London, to England.” Born in 1667, Swift never knew his father. On occasion he would claim – whether humorously or not is unclear – that he had been abducted in England as a child and spirited off to Ireland. In fact, his father died some months before he was born and his mother returned to England after leaving Swift in the care of an uncle, who had him educated at Kilkenny College and Trinity College, Dublin.

In 1688, seeing no prospect of advancement in Ireland, Swift left for England and a position as secretary to Sir William Temple, a retired diplomat. It was while working for Temple that he met Esther Johnson, then a child of eight, the daughter of Temple’s housekeeper; she eventually became “Stella”, his greatest muse. Much of Swift’s life was passed in poor health. From the age of 20 he suffered from periodic attacks of vertigo, nausea, tinnitus and deafness, symptoms that would lead 20th-century physicians to diagnose that he suffered from Ménière’s disease.

Swift’s illness did not prevent him from pursuing the political intrigues that were necessary to his advancement, or from having an active social life. He enjoyed the entertainments of city living, including the stage and coffee houses. He was a member of the Scriblerus Club, a prestigious informal association of authors that included the poet Alexander Pope and aimed to deflate quackery in politics and culture. Until his ­final years, he sustained a number of mutually rewarding friendships. It was only when he was embittered by the failure of his ambitions and tortured by gout that he came to shun company. He failed to achieve the object he most coveted in life – an English bishopric – and ended up living in a country he loathed as dean of St Patrick’s Cathedral in Dublin.

His last years were made pitiable by the slow loss of his faculties. Eccentric habits, such as scrutinising the servants at dinner in a mirror near the table, hardened into what many of his contemporaries perceived as madness. Dementia almost deprived him of speech, but in 1744 he was still able to murmur, in language reminiscent of one of Samuel Beckett’s forlorn solitaries, “I am what I am, I am what I am.” When he died in October 1745, nearly 78 years old, the cathedral bells were rung muffled for four days.

Much of the literary and academic commentary on his life is prurient in tone. Were Swift’s relations with Stella and other women platonic or physical? Did he secretly marry Stella, as gossips of the day claimed? Did he have strange sexual obsessions, as might be suggested by the voyeuristic and scatological poetry he produced at various points in his life? These have not proved terribly productive or interesting lines of inquiry. The evidence regarding his private thoughts is scanty, and posthumous psychoanalysis does not yield reliable results. Stubbs relegates these questions to a minor role in his book. The best way of beginning to understand so dauntingly strange a figure as Swift is to re-create him as he appeared to his contemporaries, and Stubbs does this with panache and verve.

Swift as Stubbs presents him was essen­tially double-minded: rigidly authoritarian in his commitment to prevailing institutions, especially the Anglican Church, and at the same time recklessly daring in stripping these institutions of any pretension to seriousness; supposedly a pious believer, yet one who could write that religion taught us how to hate but not how to love; a conservative who valued order over justice, but who put an impassioned condemnation of slavery into the mouth of the narrator in Gulliver’s Travels and defended Ireland, for whose people he had little if any affection, against English power. In his literary life he was a serial hoaxer, and in his most fantastical writings an author who prized truth over imagination; an inveterate joker, affectionately known to his closest female companions as “Presto”, who in later life was never known to laugh. Stubbs describes the paradoxical personality of a man who published most of his work anonymously but whose prose shone out, a guarded yet public figure:

He was unsmiling, while comic; ruthless in print, yet touchingly sincere and sensitive in his personal relationships. He was a keen walker and rider, and strong in body; and he was extremely delicate on the matter of his personal hygiene . . . Meanwhile, you might say what you liked against Dr Swift – if you dared; the rather fearsome figure in his black coat and wig. But you could not escape having your attention caught by Presto, the spirit of play in Swift’s nature; or by his stories and asides at the club or in the drawing room; or by the hilarious touches in his many sorties in print. Those who knew him also knew there was, however, another facet to Swift, which, for all his seeming robustness and indeed belligerence, could render him helpless in the space of minutes. In the trinity of his nature, along with Father Swift and Presto, the joking Son, this third element was a marauding unholy ghost.

There have been many lives of Swift. Most recently, Leo Damrosch’s Jonathan Swift: His Life and His World (2013) illuminated many of the man’s contradictions. This savage misanthropist was a stern critic of war and empire-building, and, living during a period of financial revolution that covered the South Sea Bubble, he attacked an economy that was based on easy credit. Stubbs makes clear his debts to Damrosch and other biographers but, to my mind, he goes further than any did previously in re-creating the world in which Swift lived and exploring the dualities of his character.

“[W]ith the sad perspicuity of the invalid,” he writes of his subject’s recurring illnesses, “Swift learned to spot the danger signals in his abdomen and temples, the throb in hearing and vision that might spread and confine him within hours to a wheeling bed.” How many of the stodgy academic studies that clutter the shelves of libraries contain such beautifully crafted lines? Another feature of Stubbs’s biography is its vast historical scholarship. As well as giving us a thoroughly credible Swift, this is a riveting account of English and Irish life in the late 17th and early 18th centuries. Above all, he tells us more than we previously knew of Swift’s “mercurial second self”: the elusive author of the Modest Proposal and Gulliver’s Travels. If there can be a definitive life of Jonathan Swift, this is it.

What Stubbs does not do is to unravel the contradictions of his subject’s singular mentality; most likely no one can do so. But at several points Stubbs points to a possible explanation of these conflicts. As he represents him, Swift was a lover of reason who believed in God as the guarantor of rationality in the world. When he attacked injustice and hypocrisy, he was invoking an order in the mind – divine and human – against the disorder of society. The savagery of his irony came from this certainty. Swift was the opposite of the postmodern liberal ironist, a commonplace figure today, who imagines that intolerance can be overcome by showing the contingency of our beliefs and values.

For Swift there is no contradiction between irony and what we might now take as pure intolerance. He was not at all a tolerant person. Swift’s irony instead very often expresses the anger of a moral authority who is presented with the standards of a debased majority, and illustrates their corruption by speaking for a moment as if he accepted and shared it.

Swift’s disgust with humankind, in this view, was not an accident of temperament, but the result of judging fellow human beings by the standard of reason they claimed for themselves and finding them wanting.

Swift’s work illustrates an irony of ration­alism. Unlike most rationalists, who use reason to prop up their conventional prejudices and opinions, Swift used it to judge the human world. The sceptical David Hume concluded that “reason is, and ought only to be the slave of the passions”. Suggesting that reason should serve life rather than rule it, this was a wise observation. But reason, for Swift, was a passion in its own right, and one to which he was enslaved. Gulliver’s Travels is full of incidents showing that human standards of size and strength are relative. Yet he was wholly unable to follow the imperturbable Hume in accepting that reason is powerless against nature, convention and the twists of human events.

Writing to his friend Alexander Pope about Gulliver’s Travels, Swift described his chief end as being “to vex the world rather than divert it”. He achieved this, he said, by “proving the falsity of that definition animal rationale”, showing instead that man had only a capacity for rationality, which he failed to use. The structure of Gulliver’s Travels was erected on the basis of “this great foundation of misanthropy”, and Swift wrote that he “never [would] have peace of mind till all honest men are of my opinion”. Yet what reason did he have for believing that he could provoke his readers into being rational? Or for thinking that “honest men” would recognise how irrational they had been? In fact, the book he produced diverted its readers as few others have done, and became a classic story for children.

Aside from his belief in a divine order, which he may well have questioned while never wavering in his commitment to the Church, Swift had no reason for believing in reason. It may have been a nagging awareness of reason’s impotence, together with the normal travails of ageing, which made him sadder as he grew older. Writing again to Pope, he noted: “The common saying of life being a farce is true in every sense but the most important one, for it is a ridiculous tragedy, which is the worst kind of composition.” Human life may be absurd, as Swift suggests – but it is tragic only if you think human beings could somehow choose to be more rational than they have ever been.

Against all reason, Swift persisted in this faith until his mind failed. If this inveterate joker found life a dark and desolate farce, it was because in the end he took the human comedy too seriously.

John Gray is the New Statesman’s lead book reviewer

Jonathan Swift: the Reluctant Rebel by John Stubbs is published by Viking (752pp, £25)