Warning: Wikipedia contains spoilers.
Instead the main protagonist is a boy named Tip, who has been under the guardianship of a witch in the Gillikin Country named Mombi for as long as he can remember. As Mombi is returning home, Tip plans to frighten her with a scarecrow he has made. Since he had no straw available, Tip instead made a man out of wood and gave him a pumpkin for a head, naming him Jack Pumpkinhead. Mombi isn't fooled, and she takes this opportunity to demonstrate the Powder of Life that she bought from another sorcerer, Dr. Nikidik (though in The Patchwork Girl of Oz his name's given as Dr. Pipt) on Jack, bringing him to life and startling Tip, whom Mombi catches.
Tip leaves with Jack that night and steals the Powder of Life because Mombi plans to turn him into a marble statue in the morning. As they head for the Emerald City, Tip uses the Powder to animate the Saw-Horse so Jack can ride him -- for even though his wooden body doesn't tire, it can get worn away from all that walking. Tip loses them as the tireless Saw-Horse gallops faster and he meets with General Jinjur's all-girl Army of Revolt which is planning to overthrow the scarecrow, who's ruled the Emerald City since the end of The Wonderful Wizard of Oz. Marching with the Army, Tip meets again with Jack, the Saw-Horse, and now the Scarecrow as they flee the Emerald City in Jinjur's wake.
The companions arrive at the castle of the Tin Woodman, who now rules the Winkie Kingdom, and plan to retake the Emerald City. On their way back they are diverted by the magic of Mombi (who Jinjur recruited to help her apprehend them), joined by the Highly Magnified and Thoroughly Educated Woggle-Bug, and aided by the Field Mice and their queen. Jinjur and her soldiers are scared by the Field Mice out of the main palace, but they still occupy the Emerald City itself. The Scarecrow proposes manufacturing a flying beast called a Gump by which they can escape through the air. Tip animates this collection of palace furniture with the Powder of Life, and they fly off, with no control over their direction, out of Oz and land in a nest of Jackdaws with all of the birds' stolen goods.
In their attempt to drive the Jackdaws from their sanctuary, the Scarecrow's straw is taken away and the Gump's wings are broken. Using the Wishing Pills they discover with the Powder of Life, Tip and his friends escape and journey to the palace of Glinda the Good. They learn from Glinda that the rightful ruler of Oz, a girl named Ozma, was hidden by the Wizard of Oz long ago and that she is the rightful ruler of the Emerald City, not the Scarecrow (who didn't really want the job anyway). Glinda discovered that the Wizard made three visits to Mombi, but not what they were for. She therefore accompanies Tip, Jack, the Saw-Horse, the Scarecrow, the Tin Woodman, the Woggle-Bug, and the Gump back to the Emerald City to see Mombi. The witch tries to deceive them by first disguising a chambermaid as her (which fails) and then elude them as they search the Emerald City for her. Just as their time to search runs out, the Tin Woodman plucks a rose to wear in his lapel, unaware that this is the transformed Mombi!
Glinda discovers the deception right away and leads the pursit of Mombi, who is finally caught as she tries to run across the Deadly Desert in the form of a fast- and long-running Griffin (though later books state that anyone who touches the Desert in transformed into dust). Under pressure from Glinda, Mombi admits that the Wizard brought her the infant Ozma and that she used her magic to transform her into a boy -- Tip, the boy who she'd been guardian of. As first he's shocked to learn this, but Glinda and his friends help him to accept his destiny, and Mombi performs her last spell (Or is it? In The Tin Woodman of Oz, the Scarecrow asks a boy who'd been given twenty legs whether Mombi had transformed him based on a physical description of her).
The restored Ozma (whose physical appearance differs considerably between this book and the next, Ozma of Oz) leads her friends in retaking the Emerald City. The Tin Woodman and the Scarecrow, now stuffed with paper money that's worthless in Oz except as stuffing, return to the Winkie Country with Jack Pumpkinhead, the Gump is disassembled at his request (though his head, which was a hunting trophy, can still speak), Glinda returns to her palace in the Quadling Country, the Woggle-Bug remains as Ozma's advisor, and the Saw-Horse becomes her personal steed.