Few things troubled the sunny complacency of Edward John Moreton Drax Plunkett, the eighteenth Baron Dunsany, but the prospect of being considered a dilettante and a small talent stood foremost among them. He had reason to hope that it would be otherwise. After knocking around for the first few years of the twentieth century, engaging in the typical pursuits of the Anglo-Irish aristocracy—hunting, soldiering, cricket, and an unsuccessful run for Parliament—he’d tried his hand at writing. He had to pay to put out his first book, in 1905, a sui-generis work of invented, quasi-Oriental mythology titled “The Gods of Pega¯na,” but he had no trouble finding publishers after that. W. B. Yeats, then the leader of the Irish Renaissance, described him as “a man of genius,” and produced his plays at the Abbey Theatre. Most of Dunsany’s plays were popular, and his verse was once such common currency that young Amory Blaine, the hero of F. Scott Fitzgerald’s “This Side of Paradise,” takes to reciting it to the accompaniment of graphophone music during his “decadent” phase at Princeton.

By the nineteen-thirties, however, Dunsany’s sort of writing had fallen drastically out of favor, and his reputation—unlike that of Oscar Wilde, another passion of Amory Blaine’s freshman year—has never recovered. He became estranged from Yeats, and when the poet co-founded the Irish Academy of Letters, in 1932, Dunsany was offered only an associate membership. Full membership, he was told, was reserved for those who wrote about Ireland and the Irish. Dunsany’s settings tended to be imaginary, the bejewelled domains of scimitar-wielding warriors, kings, beggars, thieves, and prophets answering to pagan pantheons that bore scant resemblance to the Celtic legends that Yeats loved. Dunsany was upset, and the Irish poet and literary gadfly Oliver St. John Gogarty would later joke that the Academy had been “founded to keep Dunsany out.” Gogarty, like Dunsany, saw it as a personal snub. (Dunsany was admitted as a full member only years later.)

The decades between Dunsany’s promising start and his exclusion from Ireland’s literary élite had seen the nation split on the question of home rule. While many intellectuals, like Yeats, became increasingly committed to the cause of Irish independence—a goal largely achieved with the creation of the Irish Free State, in 1922—others, like Dunsany, supported continued union with England. And yet, despite the pitch of feeling surrounding Irish nationalism and home rule, Yeats hadn’t quarrelled with Dunsany over politics. No one did, really. Even Dunsany’s nationalist neighbors in County Meath overlooked his reactionary rantings. This, more than the judgment of the Academy, should have been a warning. If his political views weren’t taken seriously in the Ireland of the nineteen-twenties and thirties, could anything else about him be?

The journey to obscurity, when it starts from a vantage as eminent as Dunsany’s, is often as idiosyncratic as the path to glory. How did a writer of talent—a writer whom Yeats compared to Baudelaire, and who once had five plays on in New York at the same time—wind up nearly, if not quite, forgotten? Dunsany continued to write and publish stories, poetry, memoirs, and novels until his death, in 1957. He never felt that he got the recognition he deserved, something he attributed to the vagaries of literary fashion, especially the ascendancy of such “frightful nonsense” as the verse of T. S. Eliot. He became, as Mark Amory, in a 1972 biography of Dunsany, says, “an Edwardian survival out of tune with the times.” If not for contemporary advocates of fantasy fiction, who see him as a pioneer of the genre, a new selection of his tales, “In the Land of Time,” from Penguin Classics ($14), would surely never have appeared. It is too easy, however, to blame Dunsany’s disappointments on the fickleness of public taste. Modernism happened for a reason, and so did Dunsany’s slow drift to the margins of literary renown.

Too much good fortune can derail an artist, and few writers are born as fortunate as Dunsany. He was as handsome, clever, and rich as Austen’s Emma Woodhouse and equally lacking in troublesome self-knowledge. He was born in 1878, the eldest son of the seventeenth Lord Dunsany. In “Patches of Sunlight,” the first of three volumes of memoirs, he gives the impression of having been a somewhat lonely boy. His mother was moody, and his father worsened his already poor health by experimenting with drugs and self-administered X rays. Dunsany’s father died in 1899, leaving his twenty-one-year-old son in possession of a venerable title, a comfortable fortune, a country house in England, and the family castle in County Meath.

Indifferently educated at Eton and the Royal Military Academy at Sandhurst, Dunsany nevertheless acquired undying admiration for the Romantic poets and the cadences of the King James Bible. In 1899, he joined the Coldstream Guards and sailed off to South Africa to fight in the Boer War. It was the beginning of a lifelong enthusiasm for mortal peril, a condition that Dunsany embraced with the blithe physical courage of someone who never expects that he will be the one to be injured. Of his initiation under a hail of Boer bullets, he coolly wrote, “I have no wish to say anything critical of anyone’s shooting, or to belittle some rifle that may be dear to its owner, but I cannot see why they did not get the whole lot of us.” The African landscape, with its vast, parched stretches of unpeopled wilderness, sunk in more deeply; lonely deserts became one of his favorite fictional settings.

Out of the Army and at loose ends, Dunsany, at twenty-six, had the luck, or sense, to marry well. His wife, Beatrice Villiers, was a daughter of the Earl of Jersey, and for the next fifty-three years she lovingly tolerated his eccentricities, even as they blossomed into full-fledged crankishness: the elderly Dunsany would hold forth at length on the evils of “adulterated” commercial table salt (he carried his own supply of rock salt everywhere) and forbade the use of furniture polish in his home (it had to be applied when his back was turned).

It was during his courtship of Beatrice that Dunsany began to dabble in writing. Through his uncle, a politician, he had already encountered members of the Irish literary scene, including Yeats and George William Russell, a poet of the Celtic revival who wrote under the pseudonym Æ. The prestige of Dunsany’s title and his occasional offers of cash to support literary projects certainly helped make him welcome, but his work was genuinely admired as well. Today, when writers churn out mass-market paperbacks of generic fantasy fiction by the crate, it’s easy to forget how original Dunsany’s phantasmagorical lands and mythologies must have seemed. His contemporaries marvelled at his knack for coining evocative names and at his style, praised by Gogarty for being “as pure, fabulous and as rare as the unicorn.”

Dunsany’s first book, “The Gods of Pega¯na” (included in its entirety in the Penguin volume), related the cosmogony of the imaginary island nation of Pega¯na in a prose style that mimics the archaic cadences of the Bible. This imitation is so persuasive that few have noticed how little understanding of religious feeling its author shows. Pega¯na has gods of dust, of silence, and of “little dreams and fancies” but no gods or goddesses of the harvest, of war, or of love—pretty much the core curriculum for heathen deities. Dunsany’s creation is a sumptuous pageant of Symbolist exotica that lies closer in spirit to Aubrey Beardsley and The Yellow Book than to any actual sacred text. The myths that Dunsany concocted elaborate on the futility of human ambitions and even the ephemerality of the gods themselves, who will vanish into nothingness on the awakening of a still older creator, called Ma¯na-Yood-Susha¯i. “We are the gods,” these divinities chant. “We are the little games of Ma¯na-Yood-Susha¯i that he hath played and hath forgotten.” Dunsany, himself an atheist, seemed indifferent to the needs that religions arise to answer: for hope, or meaning, or a sense that the universe is directed by entities not unlike ourselves. What Dunsany liked about gods was their empyrean vantage point, remote from the world and amused by human striving.