While he was going to college my brother Dave worked summers as a janitor at Brunswick High. For part of one summer I worked there, too. One day I was supposed to scrub the rust-stains off the walls in the girls' shower. I noticed that the showers, unlike those in the boys' locker room, had chrome U-rings with pink plastic curtains attached.

This memory came back to me one day while I was working in the laundry, and I started seeing the opening scene of a story: girls showering in a locker room where there were no U-rings, pink plastic curtains or privacy. And this one girl starts to have her period. Only she doesn't know what it is, and the other girls – grossed out, horrified, amused – start pelting her with sanitary napkins … The girl begins to scream. All that blood!

I'd read an article in LIFE magazine some years before, suggesting that at least some reported poltergeist activity might actually be telekinetic phenomena – telekinesis being the ability to move objects just by thinking about them. There was some evidence to suggest that young people might have such powers, the article said, especially girls in early adolescence, right around the time of their first —

POW! Two unrelated ideas, adolescent cruelty and telekinesis, came together, and I had an idea …

Before I had completed two pages, ghosts of my own began to intrude; the ghosts of two girls, both dead, who eventually combined to become Carrie White. I will call one of them Tina White and the other Sandra Irving.

Tina went to Durham Elementary School with me. There is a goat in every class, the kid who is always left without a chair in musical chairs, the one who winds up wearing the KICK ME HARD sign, the one who stands at the end of the pecking order. This was Tina. Not because she was stupid (she wasn't), and not because her family was peculiar (it was) but because she wore the same clothes to school every day.

Sandra Irving lived about a mile-and-a-half from the house where I grew up. Mrs Irving hired me one day to help her move some furniture … I was struck by the crucifix hanging in the living room, over the Irving couch. If such a gigantic icon had fallen when the two of them were watching TV, the person it fell on would almost certainly have been killed.

I did three single-spaced pages of a first draft, then crumpled them up in disgust and threw them away.

The next night, when I came home from school, my wife Tabby had the pages. She'd spied them while emptying my waste-basket, had shaken the cigarette ashes off the crumpled balls of paper smoothed them out and sat down to read them. She wanted me to go on. She wanted to know the rest of the story.

• This piece is taken from Stephen King's book On Writing: A Memoir of the Craft and his Introduction to Carrie. It has been abridged by his British editor.