This magical, family-oriented tale focuses on Scottish writer J. M. Barrie, his platonic relationship with Sylvia Llewelyn Davies, and his close friendship with her sons named George, Jack, Peter, and Michael, who inspire the classic play Peter Pan, or The Boy Who Never Grew Up.
Following the dismal reception of his latest play, Little Mary, Barrie meets the widowed Sylvia and her four young sons in Kensington Gardens, and a strong friendship develops between them. He proves to be a great playmate and surrogate father figure for the boys, and their imaginative antics give him ideas which he incorporates into a play about boys who do not want to grow up, especially one named after troubled young Peter Llewelyn Davies.
Although Barrie sees this family as wonderful and inspirational, people question his relationship with the Llewelyn Davies family. Sylvia was a widow: her husband died from cancer and left her with four boys to raise on her own. Barrie's wife Mary, who eventually divorces him, and Sylvia's mother Emma du Maurier, object to the amount of time Barrie spends with the Llewelyn Davies family. Emma also seeks to control her daughter and grandsons, especially as Sylvia becomes increasingly weak from an unidentified illness.
Along the way, Barrie goes on these adventures with Sylvia and her boys. He too is a boy at heart and spending time with the family is special. Barrie and his wife did not have any children of their own. Barrie takes those adventures he has with the boys and sees within them and makes it into a play, Peter Pan.
Producer Charles Frohman skeptically agrees to mount Peter Pan, despite his belief that it holds no appeal for upper-class theatergoers. Barrie peppers the opening night audience with children from a nearby orphanage, and the adults present react to their infectious delight with an appreciation of their own. The play proves to be a huge success.
Barrie is all set for his play, but when Peter arrives alone to the play, Barrie goes to Sylvia's house to check up on her, and misses the show. Peter attends the play and realizes the play is about his brothers and Barrie.
Sylvia is too ill to attend the production, so Barrie arranges to have an abridged production of it performed in her home. He gets the actors, props, and musicians together in the Llewelyn Davies house.
At the end of the play, Peter Pan points to the back doors and implies that Sylvia should go off to Neverland. She takes the hands of her boys and slowly walks out into Neverland. The living room and backyard transform into Neverland and Sylvia continues to walk on her own.
In the next scene everyone is at Sylvia's funeral. Barrie discovers that her will says that he and her mother should look after the boys, an arrangement agreeable to both.
The film ends with J. M. Barrie finding Peter on the bench in the park where they first met after Peter ran off from the graveyard. Peter is holding his book where he wrote the plays that he ripped apart and that his mother glued back together for him. Barrie sits down and puts his arm around Peter to comfort him. They both fade, and all that is left is the bench.