Now established as a leading novelist, Barrie sought new challenges. Early plays including Ibsen's Ghost (1891) and Walker, London (1892), had secured his presence as a playwright but it would be his adaption of the hugely popular The Little Minister, full of mystery and surprise, that would bring him to pre-eminence in the London theatre and greatly increase both his fame and wealth. Possessing remarkable aptitude as a playwright and coming increasingly under the spell of theatreland, it would now become Barrie's main focus and he would go on to have many successes, usually comedies of manners including Quality Street (1901) and The Admirable Crichton (1902). Part of its allure was the glamour of the actresses for whom he could create leading roles. At just over five foot tall, Barrie felt overlooked by women and the seeming confidence and independence of many of the actresses attracted and intrigued him. In 1891 he was introduced to Mary Ansell who was to take a part in Walker, London. They became good friends before marrying in Kirriemuir in 1894.
By all accounts it was a disastrous union on both sides. Despite his initial infatuation, married life seemed to lack meaningful connection for Barrie. Perhaps like his fictional Tommy Sandys's in his marriage to Grizel, he was playing a role that he couldn't sustain. Barrie's immersion in his work would have made it hard for him to meet his wife's emotional and physical needs. The marriage ended when Mary left Barrie for an acquaintance of his named Gilbert Cannan. The divorce hearing was particularly painful and humiliating for Barrie who was now a public figure; it received full coverage and exposed details of his shortcomings; the marriage was not consummated. Despite the pain that this caused him, Barrie remained loyal to Mary and supported her financially after her second husband descended into madness. After the divorce, he settled back into bachelor life and moved to Adelphi Terrace overlooking the Thames; this address would remain home for the rest of his life.
Before his marriage ended, Barrie formed a close association with the Llewelyn Davies family. Initially drawn to Sylvia, the daughter of George Du Maurier, he soon befriended her sons George, John, Peter, Michael and Nicholas. Childless himself, he spent an increasing amount of time in their company and enjoyed inventing stories and games for them. When their father Arthur Llewelyn Davies died of cancer in1907, Barrie became something of a surrogate father, supporting them and paying their school fees at Eton. Tragically, Sylvia too would die in 1910 leaving Barrie as legal guardian of the orphaned boys. In his book J.M. Barrie and the Lost Boys (1979), Andrew Birkin documents the relationship between the writer and his charges, and the genesis of Peter Pan, the character whose fame would eclipse that of his creator, becoming one of the most iconic figures in popular culture of the twentieth century and beyond.
Peter Pan of Kensington Gardens was first introduced in the novel that Barrie wrote for the Llewelyn Davies boys, The Little White Bird (1902). In this story of a friendship between a middle aged bachelor and a young boy named David, the narrative is interwoven with fantastical stories created by the man for the child; Peter is a boy who flew away from his parents at a week old and now lives with the fairies of Kensington Gardens who appear after 'lock-out-time'. His name echoing the nature god, Peter Pan is a boy forever: he will never have the responsibilities of adulthood.
In The Little White Bird, this magical world of make believe sits beside everyday reality; when Barrie decided to write a play around his fantastical creation, reality and fantasy would merge: Peter enters the lives of the Darling family and draws them into his 'Neverland'. He is an ambiguous figure, part alluring hero rejecting the commonplace and part outcast, looking in through the window at family life but forever excluded. The unresolved problem of freedom versus responsibility and the poignancy of the lost world of childhood are key to the play's tremendously enduring appeal, making it popular with adults and children alike. Peter Pan or The Boy who Wouldn't Grow Up was first staged at The Duke of York's Theatre on 27 December 1904. Its magical nature and special effects made it a challenging play to produce, but it was an enormous hit from it's opening night onwards. Peter and Wendy (1911) is the play in novel form and Peter Pan in Kensington Gardens (1906) is the Peter Pan passages from The Little White Bird published with illustrations by Arthur Rackham. In 1929, Barrie would bequeath all rights for Peter Pan to Great Ormond Street hospital.