The plot opens in a remote Russian provincial town where the corrupt governor and his chief officials receive terrifying news: an inspector-general is arriving from St. Petersburg incognito with secret instructions to investigate them. Paralyzed by guilt over their embezzled funds, neglected institutions, and systemic graft, the officials immediately begin desperately trying to conceal the town's squalor. Their panic centers on Ivan Khlestakov, a penniless, empty-headed young civil servant stranded at the local inn because he has gambled away his last kopek.
Mistaking this minor clerk for the dreaded government inspector, the terrified governor and his subordinates trip over themselves to shower him with bribes, lavish hospitality, and groveling flattery. Khlestakov, initially baffled by the sudden royal treatment, quickly realizes the misunderstanding and plays along, happily borrowing large sums of money from every official he meets and even proposing to the governor's daughter while simultaneously flirting with her mother. Before the truth can come out, Khlestakov borrows a carriage and flees the town, leaving behind a letter to a journalist friend in which he mocks the gullibility of the officials and describes them with stinging satire.
Just as the governor and the elite recover from their panic, triumphantly celebrate the engagement to the supposed aristocrat, and boast of their future social dominance in the capital, the postmaster bursts in with Khlestakov's intercepted letter, reading aloud the devastating descriptions of their stupidity. While the enraged governor confronts the local merchants he has exploited and rails against his own blindness, a gendarme arrives with the chilling announcement that a real imperial official from St. Petersburg has just arrived and summoned them all. The play concludes in a famous frozen tableau of absolute terror.