Let's begin with aspersions. George Bernard Shaw thought it "a foolish expedient for making idle people believe that they are doing something very clever, when they are only wasting their time." In the Renaissance, Baldassare Castiglione said that being mediocre at it is better than being good, since becoming good takes so much time that you end up mediocre at everything else. For Montaigne, it was "too grave and serious a diversion."

But on the other side are all the eminences who have been pondering their moves for the past 1,600 years. Voltaire and Rousseau. Cervantes and Poe. Adams, Jefferson, Madison, and Monroe. Frederick and Peter and Catherine the Greats. Napoleon and Churchill. Newton and Einstein. Lenin and Lennon. Madonna and Arnold Schwarzenegger.

Chess exerts a vertiginous fascination. It draws you into its self-enclosed world of infinite possibilities, forking paths, traps, and escapes with its cryptic, uncanny, labyrinthine elegance. The game takes on a metaphysical aura, as if the secrets of the cosmos were hidden among those 64 squares and 32 feudal characters of varying powers. You can see how people get lost in it, or lost outside it.

The two greatest American players, for instance. Paul Morphy, a New Orleans native, dazzled and baffled Europe with his brilliant play in the 1850s, arriving when he was just 20 and thrashing every lofty opponent. But after returning to New Orleans a few years later, he sank into reclusive paranoia "and in his final years," David Shenk writes, "could be found walking the streets of the French Quarter, talking to invisible people." And after the already egomaniacal Brooklyn-born prodigy Bobby Fischer spectacularly broke the Soviet monopoly on the world championship at Reykjavik in 1972, he became increasingly erratic and paranoid, forfeited his title by refusing to defend it, got mixed up with a bizarre religious cult, and, in exile, has recently been making news with his demented anti-American and anti-Semitic rants.

Shenk adds to these stories an impressive list of other chess masters who have become unhinged in the course of their careers. And two outstanding 20th-century literary works about the game, Nabokov's novel The Luzhin Defence (The Defense in its American edition; known by its original title in a 2001 movie adaptation) and Stefan Zweig's story "The Royal Game," are both about the fine line between chess and madness.

Should it come with a surgeon general's warning: "May lead to disorientation, insomnia, hallucination, celibacy"? Does it detach us from reality?

Shenk's basic argument in this beguiling history, which moves more like a knight than a straightforward rook, jumping over material and landing in unexpected places, is just the opposite. The complex structures and strategies of chess are profoundly related to the complexities of human thought and decision-making. It's a good training for life. "For Life is a kind of Chess," as Benjamin Franklin, an avid player, wrote in "The Morals of Chess" (included, along with legendary games, as an appendix to the book). Shenk, a late convert to the game himself, recounts his visits to schools in troubled New York neighborhoods where chess programs have given kids a new sense of purpose and self-discipline.

It emerged around the fifth century as the Indian war game chaturanga, which may have evolved out of other board games played along the Silk Road to China. It reappeared in a more recognizable ancestral form in 6th-century Persia, where it was called chatrang. By then the 16 pieces on each side of the 64-square board (not yet checkered) were a king, a minister, two elephants, two horses, two Rukhs (chariots), and eight foot soldiers.

After the seventh century, chess, shatranj in Arabic, became deeply embedded in Islamic culture, which produced the first masters and the first chess treatises and problems. Caliphs and philosophers and merchants and adolescent girls all learned the game. It thus arrived in Spain, and soon caught on across medieval Europe.

Shenk suggests that its captivating power wasn't just a matter of its metaphorical resonance in cultures where war and rigid social hierarchy, reflected in the chessboard battlefield and its ranked pieces, had central roles. The real secret of chess is that, unlike most games, then and now, it leaves no place for chance. The outcome is the result of the moves you (and your opponent) have freely chosen. The game conveyed a subliminal and subversively modern promise of self-determination and scientific knowledge.

In medieval Europe, though, it wasn't taken as seriously as it was in Islamic territory. Nobody studied the game or developed sophisticated strategies. It was played under different rules in different places, including the heresy of throwing dice to determine moves. But by the Renaissance, the wayward European games began to coalesce into chess in its modern, dynamic form. Middle Eastern chess had been a slow, incremental game. The piece known there as the minister and in Europe as the queen, once limited to one-square moves, became the most powerful piece on the board in (not coincidentally) Spain at the time of Queen Isabella.

The Enlightenment, with its flair for combining logic and pleasure, brought together chess and coffee at the Café de la Régence in Paris and other urbane chess cafés. The war-simulating game seemed, despite increasingly fierce and methodical competition in the 18th and 19th centuries, to promote cosmopolitan tolerance and civility. The 20th century--offering, as usual, a depressing contrast--let politics into it, as Nazis and Communists competed for supremacy in grotesque chess propaganda.

Shenk's book is unpretentious, free of technical jargon, and accessible, even to nonplayers, though some serious experience playing helps when you come to his account of successive strategic styles (romantic, scientific, hypermodern) and the interspersed chapters that reproduce the breathtaking gambits and sacrifices of the "Immortal Game" played in London in 1851 by Adolf Anderssen and Lionel Kieseritzky.

In the last chapters, Shenk resembles a time-pressed player racing through an end game. He has too little to say about the history of world championship matches and the innovations and styles of some of the champions. He's attentive to the cultural echoes of the game, spending some time on Marcel Duchamp's balancing act of droll art and serious chess, and Lewis Carroll's chess-themed Through the Looking-Glass. But he skips, among much else, the knight's match with Death in Ingmar Bergman's The Seventh Seal and Paolo Maurensig's remarkable novel The Luneburg Variation (1993).

Still, his history has an improvisational dexterity that suits its subject, and by putting a number of stunning, historic games on display, it checkmates any lingering ambition you might have in about three moves.