The Sultan of Makyad, concerned for the moral welfare of his daughter Fatima, decides to send her to St Trinian's, a school in Barchester, where he keeps his racehorses. As news reaches Barchester that term is about to start, shopkeepers board up their fronts and policemen panic.
Bookmaker Clarence Fritton goes to see the headmistress, his sister Millicent, to persuade her to take his daughter Bella back despite her expulsion for arson (he wants her to act as a spy, obtaining information about the Sultan's horses from Fatima). Millicent grudgingly agrees after Clarence threatens to tell their mother that she's mortgaged the family home to keep the school afloat.
Burchester police superintendent Sam Kemp-Bird rings the Ministry of Education to discuss the St Trinian's situation. The minister (whose 'T' files dwarf the rest combined) says that he sent two inspectors but they never returned. As the crime wave is too big to ignore, Sam sends his girlfriend Ruby, a police sergeant, to infiltrate the school in the guise of a sports mistress named Chloe Crawley, a name Ruby loathes.
Millicent shows her round the school, where Ruby is surprised to see that chemistry lessons are given over to producing bootleg gin, while geography is devoted to identifying champagne-producing regions of France. Millicent decides not to show her the life class "until you're used to our ways".
Bella rings Clarence to say that the Sultan's racehorse Arab Boy is certain to win his next race, which will spell financial disaster for Clarence.
When Fatima and her friends come to repossess her £100 pocket money from the school safe, one of them lets slip that they plan to put it on Arab Boy at odds of ten to one. Millicent is initially shocked, but quickly realises that this might solve her financial difficulties. She summons Flash Harry, a shady character who acts as the girls' bookie, and asks her to put the school's funds on Arab Boy.
Ruby is surprised to find that the St Trinian's lacrosse goal is smaller than the other team's, and that they cheat on the toss with a double-headed coin. Further investigation reveals that the sixth form regularly convenes in the summer house with the missing Ministry inspectors. She complains to Millicent, who is quite relaxed about it. She is less happy to discover Ruby's true identity, courtesy of Flash Harry, who regularly intercepts school correspondence.
During a violent lacrosse game, Ruby is one of many casualties, another being the rival school's headmistress. Upon winning the cup, Millicent has it pawned.
Clarence decides the only way to prevent Arab Boy running is to kidnap him - but the kidnappers discover that he has already been stolen by the St Trinian's sixth form, at Bella's suggestion. The girls of the fourth form steal Arab Boy in turn, transferring him to their dormitory.
This is spotted by Millicent, who realises what's going on and joins forces with the fourth form to try to get Arab Boy back to his stable unobserved. But a spy tells Bella, and the sixth form beseiges the dormitory, preventing anyone from leaving. Millicent mobilises her staff, saying that their salaries depend on Arab Boy running. In the resulting melée, Ruby is knocked out and locked in the bathroom.
Clarence goes to discuss matters with to his sister, but the two are irreconcilable - one will be ruined regardless. This is overheard by Ruby, who makes copious notes on the bathroom linoleum.
Parents arrive and are diverted by Flash Harry to the "Brownies' Camp Fire". The Minister of Education turns up to inspect the school and is pelted with smoke bombs. Harry tells him about his two former inspectors. A coachload of former pupils turns up, and, with the aid of some wall-mounted Zulu weapons, manages to breach the sixth form defences. Arab Boy is successfully smuggled out.
The inspectors and the minister watch the race on the summer house television. Millicent is receiving a dressing-down from outraged parents when the news comes through that Arab Boy has won. In gratitude, the Sultan agrees to present the prizes, but they are stolen mid-speech.