Inventive Violet Baudelaire (Emily Browning), her intelligent younger brother Klaus (Liam Aiken), and their sharp-toothed, precocious baby sister Sunny (Kara and Shelby Hoffman) are orphaned when a mysterious fire destroys their mansion and kills their parents. Mr. Poe (Timothy Spall), in charge of the Baudelaire estate and fortune, entrusts them to their closest relative, a first cousin, the obnoxious Count Olaf (Jim Carrey), who is a playwright/actor only interested in the money Violet will inherit when she turns 18. When he learns that he will not be getting the fortune he stops all friendliness to the children: he makes them do terrible chores, slaps Klaus when he protests, grabs Sunny and abuses them when they do not make roast beef for dinner, despite not requesting it. One morning the kids' luck seems to turn when Olaf loses custody of the children after unsuccessfully attempting to kill them in a train collision at a railroad crossing. Although Count Olaf loses the kids for the near tragedy, Mr. Poe refuses to believe that Olaf tried to kill them despite it being obviously true.

Poe then sends the Baudelaires to live with their uncle, Dr. Montgomery Montgomery (Billy Connolly), a cheerfully eccentric herpetologist, who plans a trip with the children to Peru. But their stay with Uncle Monty is cut short when Olaf appears in disguise as a man named Stephano, murders Monty, and frames a large and venomous viper for the killing. As the disguised Olaf prepares to spirit the children away, Sunny reveals the snake's true gentle nature, and Olaf's plot is exposed. Poe accepts Olaf's guilt, though not his true identity. Olaf abandons his disguise and escapes in his getaway car.

The orphans are then sent to live with their Aunt Josephine (Meryl Streep), in her house perched precariously on the edge of a cliff overlooking the waters of the vast Lake Lachrymose. She has numerous irrational fears, and yet lives in a house populated with many of the things she is terrified of; but her fear of realtors prevents her from moving. A room of photographs and documents apparently contains clues to the cause of the fire that killed the orphans' parents. However, Olaf arrives once again, disguised as a sailor named Captain Sham, and quickly gains Josephine's trust. A hurricane comes to Lake Lachrymose, and Olaf regains control of the children after rescuing them and leaving Josephine to be eaten alive by deadly leeches off-screen.

Count Olaf learns that he can only have a family fortune if he marries someone or is a blood relative. He concocts his final plan, involving a play starring himself and Violet, in which their characters get married. But Olaf casts a real judge, Justice Straus (Catherine O'Hara) as the fictional judge in the play and gets a real court-approved marriage certificate; in this way the staged marriage will technically be a legal one, gaining him unlimited and unconditional access to Violet's inheritance and fortune. To ensure Violet's co-operation, he holds Sunny hostage in a cage held from a tower window, ready to be dropped if Violet refuses or finds a loophole out of the marriage. However, Klaus succeeds in stopping him when he triumphantly climbs to the room in the top of the tower, finds a light-focusing apparatus that Olaf used to set fire to the Baudelaire mansion, and incinerates the marriage certificate with it just as he reveals his scheme to the entire crowd watching the play. Olaf is arrested and suffers every hardship that he forced upon the orphans before spending life in prison. The kids learn that Olaf is acquitted by a jury and leaves; it is later discovered by the court that the jury consisted of Olaf's theater troupe allies and that the decision was a mistake; but Olaf has since disappeared.

At the ruins of the Baudelaire mansion, the three orphans find a letter left to them by their parents before they became orphans, which contains words of hope and encouragement. The envelope also contains a spyglass, one of several that signify the presence of a secret society his parents and relatives belonged to. The orphans are then sent to new "fortunate" guardians.