Alice is playing with a white kitten (whom she calls "Snowdrop") and a black kitten (whom she calls "Kitty")—the offspring of Dinah, Alice's cat in Alice's Adventures in Wonderland—when she ponders what the world is like on the other side of a mirror's reflection. Climbing up on the fireplace mantel, she pokes at the wall-hung mirror behind the fireplace and discovers, to her surprise, that she is able to step through it to an alternative world. In this reflected version of her own house, she finds a book with looking-glass poetry, "Jabberwocky", whose reversed printing she can read only by holding it up to the mirror. She also observes that the chess pieces have come to life, though they remain small enough for her to pick up.
Upon leaving the house (where it had been a cold, snowy night), she enters a sunny spring garden where the flowers have the power of human speech; they perceive Alice as being a "flower that can move about." Elsewhere in the garden, Alice meets the Red Queen, who is now human-sized, and who impresses Alice with her ability to run at breathtaking speeds. This is a reference to the chess rule that queens are able to move any number of vacant squares at once, in any direction, which makes them the most "agile" of pieces.
The Red Queen reveals to Alice that the entire countryside is laid out in squares, like a gigantic chessboard, and offers to make Alice a queen if she can move all the way to the eighth rank/row in a chess match. This is a reference to the chess rule of Promotion. Alice is placed in the second rank as one of the White Queen's pawns, and begins her journey across the chessboard by boarding a train that literally jumps over the third row and directly into the fourth rank, thus acting on the rule that pawns can advance two spaces on their first move.
She then meets the fat twin brothers Tweedledum and Tweedledee, whom she knows from the famous nursery rhyme. After reciting the long poem "The Walrus and the Carpenter", the Tweedles draw Alice's attention to the Red King—loudly snoring away under a nearby tree—and maliciously provoke her with idle philosophical banter that she exists only as an imaginary figure in the Red King's dreams (thereby implying that she will cease to exist the instant he wakes up). Finally, the brothers begin acting out their nursery-rhyme by suiting up for battle, only to be frightened away by an enormous crow, as the nursery rhyme about them predicts.
Alice next meets the White Queen, who is very absent-minded but boasts of (and demonstrates) her ability to remember future events before they have happened. Alice and the White Queen advance into the chessboard's fifth rank by crossing over a brook together, but at the very moment of the crossing, the Queen transforms into a talking Sheep in a small shop. Alice soon finds herself struggling to handle the oars of a small rowboat, where the Sheep annoys her with (seemingly) nonsensical shouting about "crabs" and "feathers". Unknown to Alice, these are standard terms in the jargon of rowing. Thus (for a change) the Queen/Sheep was speaking in a perfectly logical and meaningful way.
After crossing yet another brook into the sixth rank, Alice immediately encounters Humpty Dumpty, who, besides celebrating his unbirthday, provides his own translation of the strange terms in "Jabberwocky". In the process, he introduces Alice (and the reader) to the concept of portmanteau words, before his inevitable fall. "All the king's horses and all the king's men" come to Humpty Dumpty's assistance, and are accompanied by the White King, along with the Lion and the Unicorn, who again proceed to act out a nursery rhyme by fighting with each other. In this chapter, the March Hare and Hatter of the first book make a brief re-appearance in the guise of "Anglo-Saxon messengers" called "Haigha" and "Hatta" (i.e. "Hare" and "Hatter"—these names are the only hint given as to their identities other than John Tenniel's illustrations).
Upon leaving the Lion and Unicorn to their fight, Alice reaches the seventh rank by crossing another brook into the forested territory of the Red Knight, who is intent on capturing the "white pawn"—who is Alice—until the White Knight comes to her rescue. Escorting her through the forest towards the final brook-crossing, the Knight recites a long poem of his own composition called Haddocks' Eyes, and repeatedly falls off his horse. His clumsiness is a reference to the "eccentric" L-shaped movements of chess knights, and may also be interpreted as a self-deprecating joke about Lewis Carroll's own physical awkwardness and stammering in real life.
Bidding farewell to the White Knight, Alice steps across the last brook, and is automatically crowned a queen, with the crown materialising abruptly on her head. She soon finds herself in the company of both the White and Red Queens, who relentlessly confound Alice by using word play to thwart her attempts at logical discussion. They then invite one another to a party that will be hosted by the newly crowned Alice—of which Alice herself had no prior knowledge.
Alice arrives and seats herself at her own party, which quickly turns to a chaotic uproar—much like the ending of the first book. Alice finally grabs the Red Queen, believing her to be responsible for all the day's nonsense, and begins shaking her violently with all her might. By thus "capturing" the Red Queen, Alice unknowingly puts the Red King (who has remained stationary throughout the book) into checkmate, and thus is allowed to wake up.
Alice suddenly awakes in her armchair to find herself holding the black kitten, whom she deduces to have been the Red Queen all along, with the white kitten having been the White Queen. The story ends with Alice recalling the speculation of the Tweedle brothers, that everything may have, in fact, been a dream of the Red King, and that Alice might herself be no more than a figment of his imagination. One final poem is inserted by the author as a sort of epilogue which suggests that life itself is but a dream.