In 1931, Hugo Cabret, a 12-year-old boy, lives with his widowed father, a master clockmaker in Paris. Hugo's father takes him to see films and particularly loves the films of Georges Méliès. Hugo's father dies in a museum fire, and Hugo is taken away by his uncle, an alcoholic watchmaker who is responsible for maintaining the clocks in the railway station Gare Montparnasse. His uncle teaches him to take care of the clocks and then disappears. He is later discovered to have drowned.
Hugo lives between the walls of the station, maintaining the clocks, stealing food and working on his father's most ambitious project: repairing a broken automaton, a mechanical man who is supposed to write with a pen. Convinced the automaton contains a message from his father, Hugo goes to desperate lengths to fix it. He steals mechanical parts to repair the automaton, but he is caught by a toy store owner, Georges Méliès, who takes Hugo's notebook from him, with notes and drawings for fixing the automaton.
To recover the notebook, Hugo follows Méliès to his house and meets Isabelle, an orphan close to his age and Georges' goddaughter. She promises to help. The next day, Méliès gives some ashes to Hugo, referring to them as the notebook's remains, but Isabelle informs him that the notebook was not burned. Finally Méliès agrees that Hugo may earn the notebook back by working for him until he pays for all the things he stole from the shop.
Hugo works in the toy shop, and in his time off manages to fix the automaton, but it is still missing one part—a heart–shaped key.
Hugo introduces Isabelle to the movies, which her godfather has never let her see, while she introduces Hugo to a bookstore whose owner initially mistrusts Hugo. Isabelle turns out to have the key to the automaton. When they use the key to activate the automaton, it produces a drawing of a film scene. Hugo remembers it is the film his father always talked about as the first film he ever saw (Voyage to the Moon). They discover that the drawing made by the automaton is signed with the name of Isabelle's godfather and take it to her home for an explanation.
Hugo shows Georges' wife Jeanne the drawing made by the automaton, but she will not tell them anything and makes them hide in a room when Georges comes home. While hiding, Isabelle and Hugo find a secret cabinet and accidentally release pictures and screen boards of Georges' creations just as Georges and Jeanne enter the room. Georges is deeply upset and throws Hugo out, feeling betrayed.
Hugo and Isabelle find a book on the history of film and are surprised that the author, Rene Tabard, refers to Méliès as having died in World War I. Tabard himself appears, and the children tell him that Méliès is alive. Tabard, a devotee of Méliès' films, owns a copy of Voyage to the Moon. Then Hugo convinces Tabard to go to Georges' home. That night Hugo dreams of being run over by a train when trying to retrieve the heart key from the rails, a sequence that ends in a re-creation of the Montparnasse train accident. When he wakes up, he finds that the key is in its place but he suddenly turns into the same form and shape as the automaton, then awakens for good.
Hugo, Isabelle and Tabard go to Georges' home, and at first Jeanne tells them to go before her husband wakes. However, Jeanne accepts their offer to show Voyage to the Moon when Tabard compliments her as one of the actresses in Georges' films. As they finish watching the film, Georges appears and explains how he came to make movies, invented the special effects, and how he lost faith in films when World War I began, being forced to sell his films to get money, and opening the toy shop to survive. He also believes the automaton he created was lost in the museum fire and nothing remains of his life's work.
Hugo goes back to the station to get the automaton, to surprise Georges, but he is cornered by the station inspector and his dog. Hugo escapes and runs to the top of the clock tower and hides by climbing out onto the hands of the clock. Once the inspector is gone, he runs for the exit with the automaton, but he is trapped by the inspector and the automaton is thrown onto the railway tracks. Climbing onto the tracks, Hugo is almost run over by an approaching train when the officer saves him and detains him as an orphan without a guardian. While Hugo pleads with the officer, Georges arrives and says Hugo is in his care. The officer lets him go.
At the end of the movie, Georges gets a tribute ceremony to his movies with Tabard announcing that over 80 films have been recovered and restored. Georges thanks Hugo for his actions and invites the audience to "follow his dreams".