King actually wanted to stay the night at The Stanley Hotel, but they were closing down for the season. He spoke with the manager, explained who he was etc., the manager gave him the keys and said lock up when you're done.
Stephen's wife said she was going to go up to bed, she chose room 219. He wanted to wander around and check the place out. As the story goes, he heard music from behind some doors and people having a party. He walked in and tried to introduce himself, but his attempts went ignored.
King didn't realize what was going on until someone walked through him. He went to tell his wife, but forgot which room she said she was going to. So, after knocking on lots of doors, he came to the right room. When she answered, he couldn't wait to tell her what had happened to him downstairs. She said, "Oh, I almost forgot to thank you for putting away the luggage." He told her, "I didn't put any luggage away".
THAT was the inspiration for The Shining. That's also the reason why he had his own mini-series for ABC. He wanted to separate himself from the Stanley Kubrick version that was filmed in Oregon.