Barrie obliged his parents by completing his degree, but returned home still determined to be a writer, landing a job with the Nottingham Journal and sending submissions off to the London papers. The St. James Gazette began to publish Barrie's stories of Scotland in his mother's day, and with this slim encouragement he moved to London at the age of 24. He went with little money and few contacts, and yet within a very few years Barrie's work was appearing regularly in the top newspapers and journals in the country. He published three books about old Scotland — Auld Licht Idylls, A Window in Thrums, and The Little Minister — which turned into surprise best-sellers, elevating him in literary circles and opening society's doors. Barrie's boyhood idol Robert Louis Stevenson proclaimed him to be a writer of genius, and Barrie's circle of friends now included Thomas Hardy, Henry James, William Meredith, Arthur Conan Doyle, and P.G. Wodehouse.
Barrie then turned his hand to writing plays, scoring successes with Ibsen's Ghost and Walker, London. He loved the theater — and he also loved to flirt with the pretty starlets of the day, although he never went beyond flirting until he met a young woman named Mary Ansell. Mary's career on the stage was undistinguished but she was lively and intelligent, and as the two grew close, the London society papers predicted an engagement. Mary waited while Barrie dithered about her. He worried that he was unsuited to marriage — as a child he'd even had nightmares about it — and the notes in his journals from the period show a man who is wracked with doubt. He loved Mary, but did he love her deeply? Was he capable of a steady, adult love? He worried that the answer was no, but hoped that the act of marriage would mature him — so he proposed to Mary, married her in Scotland, and took her off on a Swiss honeymoon. The honeymoon was not a success, and Mary later referred to it as "a shock." Barrie's biographers suspect (as did many of his friends) that the marriage was never consummated — for he seems to have been an entirely asexual man, incapable of physical passion. In a journal entry recorded during his honeymoon he makes this note for a scene in a future play:
Wife-Have you given me up? Have nothing to do with me? Husband calmly kind, no passion & c. (à la self)
When the couple returned to London, Mary busied herself with their new house and dog, while Barrie retreated into his study and got back to work. He produced new stories, new plays, a sentimental biography of his mother — and then began Tommy and Grizel, considered by many to be his finest novel. It's the tragic story of Tommy, a writer, who is married to his childhood friend Grizel. The marriage is not a happy one, for there's something vital lacking in Tommy — he cannot love Grizel, or any woman, as he knows a woman ought to be loved. He's not like other men, he tries to explain, he's really just a boy who has never grown up. Barrie writes, "She knew that, despite all he had gone through, he was still a boy. And boys cannot love. Oh, is it not cruel to ask a boy to love?...He gave her all his affection, but his passion, like an outlaw, had ever to hunt alone."
As Barrie's biographers have remarked, one can only imagine what Mary thought when she read passages like this in print, realizing that anything she said or did might be turned into story material. But if Mary minded, she didn't show it. She carefully, dutifully kept up the public appearance of a perfectly normal marriage. There were compensations. She was wealthy now, and her husband was a celebrated man. If she didn't have his passion, and couldn't have his children, at least she had as much of Barrie's affection and attention as he had to give until, in 1897, she began to lose even that.
For it was in 1897 that Barrie became acquainted with the three little boys in Kensington Gardens: five-year-old George, four-year-old Jack, and baby brother Peter, who came to play in the park each day attended by their nanny. They talked about cricket, pirates, and fairies; he dazzled them by the way he could wiggle his ears; and before long, Barrie was meeting up with boys on a regular basis. He had always found it easier to make friends with children than he did adults. They didn't mind his moods, his long silences; they enjoyed his black humor and quirky stories, and accepted him as an overgrown boy rather than as one of the grown-ups.
On New Year's Eve, the Barries attended an elegant dinner party where Barrie was seated beside the beautiful wife of a young barrister. He soon discovered, to his astonishment, that this was Sylvia Llewelyn Davies, the mother of his friends George, Jack, and Peter — while she discovered, with equal amazement, that the mysterious man who could wiggle his ears was the famous author J.M. Barrie. Sylvia was no stranger to fame herself, for her father was George du Maurier, illustrator for Punch magazine and author of the novel Trilby (which introduced Svengali to the world); her brother Gerald was a well-known actor; and her husband Arthur was the son of John Llewelyn Davies, a prominent theologian. Sylvia was charmed by Barrie's enthusiasm for her beloved boys, and invited him to visit them at home — which he promptly did, reappearing there with increasing regularity.
Soon Barrie was a fixture in Sylvia's household — to the chagrin of her husband Arthur, who could not fathom why this strange little Scotsman was so constantly underfoot, and of Mary Barrie, disconcerted by this new focus in her husband's life. Neither Arthur nor Mary had cause to believe that Sylvia and Barrie had embarked on an affair (and Mary, especially, knew how impossible this was), but the intensity of Barrie's interest in Sylvia's boys raised more than a few eyebrows. Sylvia, however, found nothing strange in it. Completely in love with her handsome husband, she saw nothing compromising in accepting Barrie's friendship, and nothing odd in his devotion to her darling sons. She pushed Arthur's objections aside, and Arthur learned to hold his tongue, accepting Barrie's presence in their lives with as much stoicism as he could muster. Barrie's wife, for her part, made a point of befriending Sylvia and coped as best she could with the awkward fact that her husband was engrossed in the lives of another woman's children.
The question inevitably rises in relation to Barrie's involvement with the Llewelyn Davies boys whether he was a pedophile, or had repressed pedophilic tendencies. Nico Llewelyn Davies, the youngest of the boys, when asked about this after Barrie's death, dismissed the idea categorically. "I don't believe that Uncle Jim ever experienced what one might call 'a stirring in the undergrowth' for anyone — man, woman, or child," said Nico. "He was an innocent — which is why he could write Peter Pan." Writer Andrew Birkin, who spent three years researching Barrie's life for his BBC television program The Lost Boys, interviewed many who had known J.M. Barrie and conducted an extensive correspondence with Nico. Nothing he read or heard indicated that Barrie had a sexual interest in the boys. "Barrie was impotent, it's fairly clear," says Birkin (on the DVD edition of his program). "That was the tragedy of his life. Had he not been impotent, I think he would have been a womanizer — he was always falling in love with his leading ladies over the stage lights. The suggestion that he was somehow pedophilic with these boys doesn't really stand up to close examination."
In 1900, Sylvia gave birth to Michael, who would grow to be Barrie's favorite of her sons — but for now it was still George, the eldest, who was the child closest to his heart. Barrie's novel The Little White Bird (1902) is transparently based upon his relationship with George. Captain W., the novel's protagonist, meets a charming little boy in Kensington Gardens, and he sets out to win the affections of both the boy and his beautiful mother. Like much of Barrie's fiction, the novel is too sentimental to suite most modern tastes (though saved by the delicious bite of Barrie's humor), and the intensity of the narrator's obsession with the boy makes for uncomfortable reading in our less innocent age. But this tribute to children and childhood was exactly suited to the temper of its day. "To speak in sober earnest," proclaimed the London Times, "this is one of the best things that Barrie has written….If a book exists that contains more knowledge and more love of children, we do not know it." George was proud of inspiring the novel (even though it earned him teasing from his school fellows), and Sylvia loved it. What Arthur and Mary felt about the book is not recorded.