The courtyard of Ko-Ko's palace
Disguised as a wandering minstrel, Nanki-Poo is in search of Yum-Yum. Having heard that her guardian Ko-Ko, to whom she was betrothed, had been condemned to death, he now hopes to be able to marry her, but his hopes are dashed when he learns that Ko-Ko has been released from gaol and appointed Lord High Executioner.
Ko-Ko makes his grand entrance and is discussing details of his forthcoming marriage with Pooh-Bah when Yum-Yum and her sisters arrive home from school. Yum-Yum admits to Nanki-Poo that she does not love her prospective husband, but has doubts about the suitability of marrying a musician, until he reveals that he is the son of the Mikado, and has fled the court to escape the claim of Katisha to his hand.
Ko-Ko receives an imperial decree that if an execution is not carried out soon, dire punishment will follow. The difficulty of finding a victim is solved by the appearance of Nanki-Poo, about to kill himself in despair because Yum-Yum is to marry Ko-Ko. Ko-Ko offers to let him marry her if he will agree to be publicly executed in a month's time, but the wedding festivities are interrupted by the arrival of Katisha. Only the ingenuity of Yum-Yum prevents Katisha from revealing Nanki-Poo's identity.
The garden of Ko-Ko's palace
Yum-Yum prepares for her wedding and tries not to think about the subsequent execution; but even this modified bliss is cut short when Ko-Ko discovers that the wife of an executed man has to be buried alive, so she decides that marriage with Ko-Ko would be the lesser evil.
Nanki-Poo is still determined to die, and when it is announced that the Mikado is on his way and Ko-Ko realises he must perform an execution, he offers himself again; but Ko-Ko confesses his complete inability to kill anything. He then has the idea of merely producing an affidavit to the effect that the execution has taken place, and consents to Nanki-Poo marrying Yum-Yum and leaving the town.
When the Mikado, accompanied by Katisha, arrives, Ko-Ko, assisted by Pitti-Sing and Pooh-Bah, describes the fictitious execution. But this is not what concerns the Mikado. He is looking for his son, and when Katisha discovers his name on the execution warrant, Ko-Ko and his accomplices are condemned to death.
Ko-Ko tells Nanki-Poo he must come back to life, but as this will render him liable to be claimed by Katisha, he refuses unless Ko-Ko marries her himself. He does this and Katisha begs for mercy for the culprits. Nanki-Poo and his bride appear, to show that he is not dead, and Ko-Ko's ingenious explanation that the Mikado's decree is as good as fact is accepted, while Katisha has to be satisfied with him as her husband.