His early novels, including "The Little Minister" (1891) and "Sentimental Tommy" (1896), brought him popularity. His friendship with the Llewelyn Davies boys inspired his most enduring creation: Peter Pan first appeared in the adult novel "The Little White Bird" (1902), then became the celebrated play "Peter Pan; or, the Boy Who Wouldn't Grow Up" (1904), and finally the novel "Peter and Wendy" (1911).
Barrie's other notable plays include "The Admirable Crichton" (1902), a witty satire on the British class system, "What Every Woman Knows" (1908), "Dear Brutus" (1917), and "Mary Rose" (1920).
Knighted in 1913, Barrie also served as Chancellor of the University of Edinburgh from 1930. Remarkably, he bequeathed the copyright of Peter Pan to Great Ormond Street Hospital for Children, a generous gift that continues to benefit the hospital to this day.