The Pillowman stemmed in part from McDonagh's experience composing fairy tales, with names such as The Chair and the Wolfboy, The Short Fellow and the Strange Frog, and The Violin and the Drunken Angel, early in his writing career. Attempting to rewrite fairy tales he remembered from childhood, he realized that "there's something dark about them that doesn't quite come through."
In a conversation with Irish drama critic Fintan O'Toole in BOMB Magazine in 1998, McDonagh retold the Brothers Grimm version of Little Red Riding Hood, in which the wolf's stomach is filled with rocks and sewn with green wire, leading to the wolf's death. McDonagh's comment—"I would love to write something as horrific as that if I could"—indicates one potential inspiration for the story "The Little Apple Men" in The Pillowman.
It has been noted that this play borrowed heavily from a 1991 independent film Closet Land, written and directed by Indian filmmaker Radha Bharadwaj which starred Madeleine Stowe and Alan Rickman. Commenting on this, Bob Mielke, Ph.D, Professor of English at Truman State University has stated that "plot elements of Closet Land persist in another narrative host body, another way in which this text persists and haunts (if you will) our culture."