Agatha Cackle has taken over Cackle's Academy, and Mildred has been expelled. Maud tries to call Mildred on the magic mirror, to apologize for telling on her and getting her expelled, but Mildred ignores her.
Meanwhile, Agatha and Miss Gullet terrorize the school; they turn Miss Drill back from a snail, but turn Miss Bat and Algernon into frogs, and Esmerelda into a trophy, while Ethel is made head girl. She also casts enchantments so that no-one can use magic without her knowing, and Miss Hardbroom sets off the alarm by materializing in Miss Cackle/Agatha's office. She hints to Maud that Miss Cackle is trapped in the painting in the Headmistress' office.
The Great Wizard turns up, having been summoned by Miss Cackle before Agatha trapped her, and he sets fire to the birth scroll, saying he will re-write the Witches Code to save the Academy, but Agatha turns him into a balloon.
Ethel sends Tabby to Mildred with a message asking for help, and an Invisibility Potion so she can sneak into the school. Ethel has worked out that as Mildred wasn't in the school when Agatha cast her enchantments, Mildred can still do magic without being detected. Ethel lets the invisible Mildred in, and they go to Miss Cackle's office to get the painting, and find Maud and Enid already there. Maud apologizes to Mildred and they make up.
Miss Gullet then comes in, and Mildred hides while Maud, Enid and Ethel are turned into cakes and taken to the feast in the great hall. Miss Hardbroom then comes in and finds Mildred. She gives her the spell to get Miss Cackle out of the painting, but Mildred's magic isn't strong enough. She tells Mildred to leave, and tries to summon Miss Cackle herself, but her magic sets off the alarm, and Agatha traps Miss Hardbroom in the painting as well.
While Agatha is dealing with Miss Hardbroom, Mildred goes to the great hall and turns Maud, Enid and Ethel back before they get eaten. Agatha comes back and says that there's nothing they can do about her being headmistress, but Maud says that if Agatha is going to be Headmistress, they will all quit so she doesn't have anything to be Headmistress of, and everyone agrees. Agatha decides that if she can't have the school, then no one will, and casts a spell to destroy the castle.
Everyone rushes out of the crumbling castle, Ethel grabbing the Esmerelda-trophy on the way. All the students chant together to stop Agatha's spell, and this also changes Esmerelda, the teachers, and the grand wizard back into themselves. Miss Cackle then traps Agatha and Miss Gullet in a painting. Miss Hardbroom tests the first years for their exams, and Mildred crashes into a tree during her flying exam, breaking her new broom. However, Miss Hardbroom averages her score across all her exams and she just passes with a score of 51%, meaning she will be returning to Cackle's next year.
Miss Gullett, reading speech from her maglet: "And so, in conclusion, today we hail a glorious new dawn for this Academy. Wait for applause.”
Miss Gullett, still reading from the maglet: "Get some life into it, Gullett, you're about as inspiring as a dead...frog."
Agatha: Just bring me on.
Miss Gullett: Please give a warm Cackles welcome for our new headmistress!
Miss Hardbroom: You slammed into a tree and ruined a very expensive new broomstick. Most examiners would fail you for this. I, however, am not most examiners. So, averaging this mark with your written papers gives you a final mark of 51%, which means you have passed... just.