The Flaming Skeleton's appearance and abilities as a ghost would suggest that it was burnt to death by a fire, which reduced its body to bones and ashes.
Following its death, the Flaming Skeleton's spirit remained on earth and unable to move on, due to unresolved issues. During Dr. Zorba's travels around the world, he met and captured the Skeleton and imprisoned it in his mansion.
When Dr. Zorba was murdered and became the twelfth ghost, Cyrus Zorba and his family moved into the mansion. One night, when Cyrus investigates the cellar and puts on the spectral viewers, the Flaming Skeleton and three of the other ghosts appear to him. The Skeleton burns the number 13 into Dr. Zorba's diary and onto Cyrus's hand, trying to tell Cyrus that the former and the other eleven ghosts need a thirteenth ghost to move on.
The Flaming Skeleton and the other eleven ghosts presumably crossed over when Benjamin Rush died and became the thirteenth ghost.