Wai Siu-bo is a bard known for his quick wit and tall stories. One day, the police ambush Chan Kan-nam, the leader of the revolutionary Heaven and Earth Society, at the brothel where Siu-bo works. Siu-bo saves Chan Kan-nam and asks him to teach him kung-fu in return. Kan-nam accepts and inducts Siu-bo into the Heaven and Earth Society as his apprentice, with his first assignment being to infiltrate the palace and steal some secret materials. Members are marked by the Society’s mantra on their feet, but Kan-nam only manages to write down two on Siu-bo’s left foot before he flinches from ticklishness.
On the day of the palace recruitment, Siu-bo accidentally stumbles into the eunuch room before being saved by Hoi Tai-fu, the palace’s head eunuch. Suspicious of the Empress Dowager’s identity and unable to confront her himself, Tai-fu strongarms Siu-bo into stealing the Empress Dowager’s copy of the Sutra of Forty-two Chapters. When Siu-bo is discovered, Tai-fu fights off the Empress, who possesses an unexpected level of combat prowess. Amidst the conflict, Siu-bo inadvertently befriends the Princess and the Emperor, thinking that they are eunuchs. The Emperor offers to give Siu-bo both his copy and the Empress’ copies of the Sutra if he can defeat the Emperor in a fight. Siu-bo fights dirty and defeats the Emperor after grabbing his crotch, only to realize that the pair are royalty. Shortly afterward, one of the Emperor’s seditious Generals, Oboi, bursts in to make demands. When Siu-bo successfully maneuvers the Emperor around a political confrontation with Oboi, and the Princess uncovers that Siu-bo is not a eunuch himself, he is promoted to the position of spy for the Emperor, told to keep an eye on Tai-fu and Oboi.
The Princess, enamored with Siu-bo, has her way with him that evening. When the Empress Dowager finds them in the bedroom afterward, she threatens to kill him before Tai-fu once again interferes. They deliver critical wounds to each other, bringing the fight to a standstill. Siu-bo then accidentally injures Tai-fu, turning him into a child-like state and becomes subservient to Siu-Bo. With Tai-fu incapacitated, Siu-bo is promoted once more to an official.
After Oboi kills another courtier, the Emperor assigns Siu-bo and To-lung, a royal guard, to devise a plan to deal with him. but Oboi proves too strong for their plans. Provoked, Oboi fights back and tears down the Emperor’s defenses, even with Tai-fu’s help. Reminded of the Empress’ strength, Siu-bo rushes to her chambers, where she quickly subdues Oboi. Unable to reveal her fighting capabilities to the Emperor, the Empress credits Siu-bo for everything, who is then promoted once more and given Oboi’s assets, including his copy of the Sutra.
With Oboi imprisoned, Chan Kan-nam intends to stage an assault on the palace to kill both him and the Emperor before Oboi’s lackeys break him out. He bequeaths twin female bodyguards to Siu-bo and orders him to coordinate for the attack from the inside. Unable to disobey his master, Siu-bo reluctantly returns. When he arrives, the Empress Dowager interrogates him on what he has learned from the Sutras. When Siu-bo, illiterate, fails to deliver, she throws him into Oboi’s prison. When Oboi’s lackeys arrive, Siu-bo is taken hostage and carried into the woods. There, they meet the Heaven and Earth Society on their way to infiltrate the palace. Oboi and Kan-nam decimate the soldiers from the opposing sides. Kan-nam defeats Oboi when Tai-fu’s surprise sacrifice reveals Oboi’s weak spot and retreats with heavy wounds. The false Empress Dowager arrives to kill Siu-bo but not before the palace guards surround them. The false Empress tries to pin the blame on Siu-bo by revealing Siu-bo’s feet. However, the letters do not match the Society’s mantra. Unable to keep the farce up when the Princess brings out the real Empress Dowager, the false Empress flees. And with all the fighters either dead or missing, Siu-bo takes credit for Oboi’s death and for the ousting of the false Empress and is promoted to a duke. Elsewhere, the false Empress transforms back to her true form and vows to come back for Siu-bo, who will not recognize her next time.
Stephen Chow as Wai Siu-bo
Sharla Cheung as Lung-er/Empress Dowager
Ng Man-tat as Hoi Tai-fu
Sandra Ng as Wai Chun-fa, Siu-bo’s sister
Brigitte Lin as So Chuen/Divine Lady of Dragon Sect
Chingmy Yau as Princess Kin-ning
Damian Lau as Chan Kan-nam
Natalis Chan as To-lung
Fennie Yuen as Seung-yee twin
Vivian Chan as Seung-yee twin
Deric Wan as Hong-hei Emperor
Elvis Tsui as Oboi
Lee Ka-ting as Lai-chun Brothel keeper
Dion Lam as Tibetan fighter
Chan Siu-wah as Tibetan fighter
Hung Yan-yan as flag holder