Yes, "Secret Window" is based on a novella titled "Secret Window, Secret Garden " by Stephen King. The novella was first published in 1990 as part of King's collection of stories, "Four Past Midnight."