DEMOCRACY is now so much the most hallowed of political creeds, celebrated in theory even by those who fear it, that it is surprising to think how recently it ceased to be a dirty word.

From the great Greeks forward, classical political thinkers viewed democracy as a degeneration, next door to mob rule, from more natural and virtuous forms of government. And this was the bias that prevailed in the year 1712, when Jean- Jacques Rousseau first saw light of day in Geneva.

According to James Miller's brilliant study, it is to the great Genevan romantic that we owe the "transvaluation" of democracy from something suspect into something appealing. Miller's assessment certainly represents a change of tone. At least since the late J.L. Talmon identified Rousseau as one of the progenitors of "totalitarian democracy," his stock has been low and falling. With Talmon, Karl Popper and others, most modern students of political theory have scorned Rousseau as spiritual godfather to those tribunes of the people, from Robespierre to Lenin, who made themselves dictators in the popular interest.

Is the charge fair?

Miller speaks, on balance, for the defense. But his brief is qualified by the inescapable concession that Rousseau's thought was, at best, a tissue of brilliant ambiguities. Sympathetic and critical, Miller is also amused, as one must be when writing about Jean-Jacques Rousseau.

Most of what is both good and bad in Rousseau's political and social theory flows from his susceptibility to dream which he regarded as the source of beatific visions of man's nature and destiny. As Rousseau himself put it (he was often his own best critic) he found reflection wearying and saddening, but "reverie relaxes and entertains me."

In his reveries, Rousseau found himself idealizing the Geneva of his boyhood, even though its form of government was far more oligarchic than the simple, primitive popular democracy he extolled. His blinkered version of Genevan history ignored the actual past to conjure up an ideal one. That was in keeping, as Miller shows, with Rousseau's general views about the uses of history. History was primarily a convenient fable, "poetic" in essence, and might as well be shaped by fancy as need suggested. It was also in keeping that in La Nouvelle Heloise, his most popular work, Rousseau strictly excluded the study of modern history from his ideal curriculum.

Of the many oracular pronouncements that spangle Rousseau's work, the most famous and familiar is this: "Man is born free, but is everywhere in chains." It was the classic summation of his central credo: that man in the mythic state of nature was innocent and free, and that social institutions are inherently corrupting -- a conclusion reinforced, Miller tells us, by Rousseau's disillusioning sojourn as a young diplomat in Venice. The Venetian republic, once regarded as a prototype of virtues, seemed to him terribly decadent.

FOLLOWING the classical convention, Rousseau claimed in The Social Contract not to prefer democracy. But since he insisted that the people en masse were sovereign, it followed that any prolonged departure from popular wishes made a government suspect. In a hostile analysis of The Social Contract, the public prosecutor of Geneva was not far wrong when he observed that Rousseau "sees all forms of Government only as provisional forms, as Experiments that one can always change."

It was the publication of The Social Contract in the spring of 1762 that first pushed Rousseau to heights of infamy -- at least in those circles where political theory was taken seriously. Printed in Amsterdam, the tract was no sooner in circulation than it was condemned by the doctors of the Sorbonne, as the work of "a great master of corruption and error." The Parliament of Paris chimed in, in similar terms. So the master of error was forced to flee Paris just ahead of the arrest warrants.

He headed with hope back to his native Geneva. But even in the ideal city of his dreams the oligarchs reacted fearfully and banned the book. Thus was Rousseau, herald of popular rule, forced -- ironically -- to seek refuge in Neuchatel, the one neighboring canton under royal rather than popular control. I suspect Miller is right when he suggests that Rousseau was too humorless, or self-preoccupied, to savor the irony. He soon renounced his Genevan citizenship.

The vicissitudes of 1762 were only the beginning. What has kept Rousseau in more or less continual bad odor with theorists of liberal democracy is not only his affinity with Robespierrian rulers; but also the ambiguity of his thought.

Miller makes a valiant effort tosort the sense from the nonsense, to find order and system in what is an intuitive, often oracular pattern of thought. In one place Rousseau will sound quite modern, liberal, coherent; in others -- for instance, when he extols the primitive innocence of man or the wickedness of institutions, or when he celebrates the unwavering goodness of the untutored human will -- he sounds exactly the prophet of "totalitarian democracy" his critics have objected to.

IN FACT, Rousseau was indifferent when not hostile to the empirical study of political institutions. He tips his hat to "the illustrious Montesquieu," his age's closest approximation to a political scientist; but he pronounces Montesquieu's work "useless."

Establishing a convincing connection between ideas and events is always difficult, and no less so in this case. One of Miller's many strengths is that he is fully aware of the complexity of such connections, when they can be established.

It was only after Rousseau's death (July 1778) and the posthumous publication of his Confessions (1781) that the cult of Rousseau the revolutionary ("revolutionnaire malgr,e lui," as Miller wittily puts it) established itself.

Cult it was. No fewer than 35 printings of The Social Contract appeared during the French Revolutionary decade -- even a pocket edition designed for soldiers to carry into battle. Rousseau's face supplanted those of kings on playing cards. Robespierre, "incorruptible" ringmaster of the Terror, rose on a tide of Rousseauist rhetoric. Finally, with great homage, Rousseau's remains were brought to Paris for reburial among the heroes of the republic.

All this notwithstanding, Miller insists that it is unhistorical to regard Rousseau's thought as a "cause" of the Revolution. Rather, his dreamy writings, inspiring but blithely indifferent to the complexity of man's nature, history and institutions, gave revolutionaries a rationale, and an excuse to avoid serious institution-building.

James Miller's book is designed as a contribution to the ongoing scholarly argument over Rousseau's proper place in the Western tradition. It is certainly a major one, trenchant and balanced. My only cavil is that Miller probably scants the contribution of the American revolutionaries (and before them the Whig apologists of the 17th-century English Revolution) to making democracy respectable, the better to establish Rousseau's originality perhaps.

But such small doubts aside, this book is so well and wittily conceived, so splendidly executed, that it will surely claim a large non-specialist audience. All you need is a taste for historical curiosities -- and Rousseau was one -- and for bright, lucid writing. Mr. Miller, alas, has not quite persuaded me of the Rousseauist virtues. I think back to the visit of the young James Boswell with Rousseau in 1764, when the sage dismissed his own thought to Boswell as a "rigmarole." Ever his own best critic, as I have said, Rousseau was on that occasion bang right.