"I HAD BEGUN IT," wrote Flaubert of "A Simple Heart," his story of an old serving woman's love for a parrot, "solely on account of her, only to please her. She died while I was in the midst of this work. So it is with all our dreams."

The "her" of this wistful quotation is George Sand, who had once complained to the author of Madame Bovary that his novels, unlike her own, produced desolation instead of consolation. Perhaps they did once, but Geoffrey Braithwaite -- the narrator of Julian Barnes' serene and masterly novel Flaubert's Parrot -- looks to Flaubert for comfort after the death of his wife. He is a retired doctor and an amateur scholar, who has been researching the French novelist's life to occupy his empty days of bereavement. The novel we read consists of his notes, meditations, and fantasies about Flaubert's achievement and character.

Barnes himself -- the television critic of the London Observer, a former literary editor of the Sunday Times, and the author of the much admired novel, Metroland -- has another purpose in this artfully artless gathering of Flaubertiana. He uses Braithwaite's investigations to reflect on the ambiguous truths of biography, the relationship of art and life, the impact of death, the consolations of literature. Picked up casually, Flaubert's Parrot may resemble a scholar's file folder that somehow has gotten itself published. But these documents slowly unfold the moving story of a husband's devotion to his wife, and a mystery surrounding her death, while never ceasing to be a Nabokovian romp, a gentler, more light-hearted cousin to Pale Fire and The Real Life of Sebastian Knight.

The novel opens withBraithwaite's discovery in Rouen -- while on a trip shortly after Ellen Braithwaite's death -- that the Hotel de Ville and Flaubert's house at Croisset each displays a stuffed parrot said to be the "Loulou" of "A Simple Heart." Intrigued, Braithwaite decides to learn which bird is truly Flaubert's parrot. This historical problem occupies him throughout the book (and provides a rousing ambiguous climax), but serves primarily as the pretext for a delicious pot-pourri of quotations, legends, facts, fantasies, and interpretations of Flaubert and his work.

One chapter, for instance, develops into a virtuoso essay on Flaubertian irony. In another Braithwaite points out the obtuseness of biographer Enid Starkie, going so far as to assert that the frontispiece of Flaubert: The Making of the Master is a photograph not of the young novelist but of his friend Louis Bouilhet. In a daring turn, Braithwaite even brings Louise Colet on stage to explain her view of Flaubert and their bizarre love affair during the composition of Madame Bovary. Other sections allude to the speeches or writings of novelist Anthony Powell, the critic Christopher Ricks, Jean-Paul Sartre (of course), William Golding, and even Raymond Chandler. Barnes also plays with historical evidence: He has Braithwaite note that carriages in Rouen during the 19th century were minuscule -- thus Emma Bovary's seduction must have been a cramped and complicated, rather than romantic, affair. But is this true? What is the status of a "fact" within a work of the imagination? When Braithwaite offers his list of 10 interdictions for English fiction -- "No novels in which the narrator, or any of the characters, is identified simply by an initial letter. . . a twenty year ban on novels set in Oxford or Cambridge, and a ten year ban on other university fiction" -- he concludes with, "There shall be no more novels which are really about other novels." What are we to make of that statement in a novel largely about another novel (Madame Bovary) and its author?

THROUGHOUT this anatomy of the artist, Braithwaite perfectly sustains a tone of melancholy, self- reflective wit: "Nowadays we aren't allowed to use the word mad. What lunacy." In such a spirit, he supplies a supplement to Flaubert's Dictionary of Accepted Ideas listing old chestnuts about the "Hermit of Croisset" and his circle. All this might seem dry, but Barnes' style and Braithwaite's autumnal wisdom make the novel into a kind of Stoic comedy. That ambiguous tone rings most unmistakably in the mock- serious preamble to several examination questions near the end of the book:

"It has become clear to the examiners in recent years that candidates are finding it increasingly difficult to distinguish between Art and Life. Everyone claims to understand the difference, but perceptions vary greatly. For some, Life is rich and creamy, made according to an old peasant recipe from nothing but natural proucts, while Art is a pallid commercial confection, consisting mainly of artificial colourings and flavourings. For others, Art is the truer thing, full, bustling and emotionally satisfying, while Life is worse than the poorest novel: devoid of narrative, peopled by bores and rogues, short on wit, long on unpleasant incidents, and leading to a painfuly predictable denouement."

For a novel laced with such jeux d'esprit, Flaubert's Parrot nevertheless builds up a fair head of suspense: Precisely how and why did Ellen Braithwaite die? Note that her initials are those of Emma Bovary. Remember that Charles Bovary was a doctor. Recall this book's obsession with adultery, madness, death and consolation. Consider the web of relationship -- the reality of Flaubert's life, Braithwaite's researches, Barnes' revelations about Braithwaite.

At one point, the author/narrator defends his admiration for Flaubert against an imaginary prosecuting judge. "Flaubert teaches you to gaze upon the truth and not shrink from its consequences; he teaches you, with Montaigne, to sleep on the pillow of doubt; he teaches you to dissect out the constituent parts of reality, and to observe that Nature is always a mixture of genres; he teaches you the most exact use of language; he teaches you not to approach a book in search of moral or social pills -- literature is not a pharmacopeia; he teaches pre-eminence of Truth, Beauty, Feeling, and Style. And if you study his private life, he teaches courage, stoicism, friendship; the importance of intelligence, scepticism, and wit; the folly of cheap patriotism; the virtue of being able to remain by yourself in your own room; the hatred of hypocrisy; distrust of the doctrinaire; the need for plain speaking."

Not too surprisingly, Barnes' novel also displays many of these same qualities of nobility and intelligence. Anyone who reads Flaubert's Parrot will learn a good deal about Flaubert, the making of fiction, and the complex tangle of art and life. And -- not least important -- have a lot of rather peculiar fun too. CAPTION: Picture 1, Julian Barnes. Copyright (c) By Jerry Bauer; Picture 2, Gustave Flaubert. Portrait by Eugene Girand.