Andrew Craw is the titular ghost in the Goosebumps book The Headless Ghost.
Before his death, Andrew was an unruly brat who would abuse animals and play cruel tricks on others. One day, he met up with the ghost of a sea captain who pulled his head off and hid it somewhere in Hill House. Centuries later, Stephanie Alpert and Duane Comack found Andrew's head behind a secret wall as they were exploring the house. Andrew's ghost appeared to retrieve his head and thanked Stephanie and Duane before departing into the afterlife.
In the TV episode, Andrew was played by Daniel Goodfellow and his head was found in a dumbwaiter. He was also much nastier and brattier and more evil in the episode, insulting and threatening Stephanie and Duane instead of thanking them for finding his head.