In British India, two officers locate Mary Lennox, Margaret O'Brien, a recently orphaned girl whose parents died during a cholera epidemic. She boards a ship to Yorkshire, England to stay with her widowed uncle Herbert Marshall Archibald Craven at Misselthwaite Manor. Mrs. Medlock, Gladys Cooper Craven's housekeeper, escorts her to the manor and informs Mary that her uncle will not be seeing her. When Mary questions her orders, Mrs. Medlock locks her inside her room.
The next morning, Mary meets Martha Sowerby, Elsa Lanchester a lively servant maid, who refuses to obey Mary's commands and instead responds with incessant laughter. Outside, Mary meets Dickon, Brian Roper a young forest friend who has befriended a raven. He tells Mary about a secret garden hidden behind a vine-covered wall, to which Craven has buried the key. Later that night, Mary encounters her uncle, who is ready to leave for London. Mary asks about a painting, and Craven reveals that the portrait depicts his wife, who died ten years ago.
The following day, Mary meets Ben Weatherstaff, Reginald Owen a gruff gardener, and learns that the garden has been kept locked for the entire decade. Shortly after, the raven unearths the buried key and Mary slips it into her pocket. One night, Mary discovers the bedroom of Colin Craven, Archibald's son and Mary’s cousin, who has lived as a sickly invalid his whole life. Colin confesses he throws tantrums and says his father rarely visits him for fear that Colin might die. Mary also finds the painting of Craven's wife, and Colin explains that his mother died after a tree branch fell on her.
A day later, Mary and Dickon unlock the entrance to the garden beyond the hedges. Inside, they find a neglected sanctuary that has fallen into disrepair, and they locate the branch that had once caused tragedy for Craven’s family. Back inside the mansion, Colin’s mood begins to lift as Mary calms him, and in the days that follow she brings in animals to visit his room. She introduces Colin to Dickon, and together they share stories about the hidden garden, which helps the boy drift into sleep.
Colin’s physician, Doctor Fortescue, George Zucco believes Colin is simply afraid and needs fresh air and new friends. He also suggests removing the irons from Colin’s legs. Mary and Dickon wheel Colin to the garden in his chair, and they discover the space flourishing with new life and color. Meanwhile, Craven, who has returned from London, resents Fortescue for his medical report, and Fortescue accuses Craven of wallowing in grief, which is taking a toll on Colin’s health.
Ben Weatherstaff locates the children inside the garden and orders them to leave, a reminder of the boundaries still governing the estate. Overnight, Craven visits Colin and reveals plans to sell Misselthwaite and move to Italy, which upsets the boy. The next morning, Craven meets with his attorney and contemplates destroying the garden, but a sudden change of heart compels him to walk toward the beloved place instead. Inside, Colin rises from his wheelchair and moves toward his father, and the two share a long-awaited embrace as Craven decides not to sell the estate.