According to the film, Casper died from pneumonia. The 1995 feature film Casper, however, revived the notion that Casper was a deceased human and provided a brief account of his death. In the 1960s and 1970s, the stock answer provided by Harvey Comics in response to those wondering how Casper died was that he was a ghost simply because his parents were already ghosts when they were married. He was thereafter portrayed with feet and shown to have ghostly parents & became slightly slimmer. This somewhat macabre premise was later abandoned in favor of the idea that ghosts were merely a type of creature, similar to ghouls, goblins, etc. Casper's death (as well as the reason why he became friendly) has become disputed since then.
Specifically, the short There's Good Boos To-Night featured Ferdie, a fox befriended by Casper, coming back from the dead as a ghost. Early Casper cartoons seemed to suggest this, as they portrayed him 'living' beside a gravestone. Given that Casper is depicted as a ghostly slightly obese little boy, there is a controversy among fans of the series about whether or not he is a dead child. According to the 1995 feature film Casper, he died when contracted pneumonia from playing out in the cold for too long, but so far, that's the only version there is. Not much is known about how Casper came to be a ghost, or how he did end up with the Ghostly Trio.