A year ago, Nanki-Poo (son of the Mikado, in disguise as a musician) met Yum-Yum and fell in love with her. But Yum-Yum is betrothed to her guardian Ko-Ko. When Nanki-Poo hears that Ko-Ko has been condemned to death for flirting, he thinks that he will now be able to marry her.
However, Ko-Ko has instead been raised to the rank of Lord High Executioner. Although Yum-Yum is delighted to see Nanki-Poo again, they cannot marry. So, when a message from the Mikado is received commanding an immediate execution, Ko-Ko persaudes Nanki-Poo to be the victim, on condition that Nanki-Poo can enjoy one month of married bliss with Yum-Yum beforehand.
All agree to this satisfactory solution when Katisha, an older woman who the Mikado has promised can marry Nanki-Poo, arrives to expose Nanki-Poo.
Ko-Ko discovers that the bride of a beheaded man must be buried alive, so Yum-Yum decides that she will not marry Nanki-Poo after all. It is announced that the Mikado will visit, so Ko-Ko bribes the town dignitary Pooh-Bah to swear that Nanki-Poo has already been beheaded. He then tells Yum-Yum to go off and marry Nanki-Poo to keep him quiet.
The Mikado arrives and is interested to hear that an execution has taken place but Katisha notices Nanki-Poo’s name on the warrant of execution and tells the Mikado. He immediately sentences the culprits to death and the only way that Nanki-Poo can safely come to life again is for Katisha to be married to someone else – so Ko-Ko obliges.