Voldemort's Severed Soul Couldn't Pass On To The Afterlife
In Harry Potter and the Half-Blood Prince, Dumbledore explained that the act of murder did terrible damage to a person's Soul. To kill another human is such an abomination of nature that it physically rips the soul. A person who makes a Horcrux takes advantage of this damage, performing an additional spell that takes a fragment and stores it within a physical vessel. However, regardless of whether a witch or wizard does this, Dumbledore explains that a fractured soul is doomed since only one that is intact can pass on into the afterlife.
Of course, Voldemort did not have an intact soul when he died at the Harry Potter and the Deathly Hallows. He had fractured his soul several times and purposely created six Horcruxes. This meant that the Dark Lord suffered a fate worse than death when his body was killed during his final battle with Harry. His damaged soul, which was represented by the flayed and bloody infant-like creature in the King's Cross Purgatory, would be stuck in limbo for all eternity. There would be no peace for Voldemort's soul, only eternal pain and suffering.
There Was Only One Way Voldemort Could Have Saved His Soul In Harry Potter
Once a person fragments their Soul through murder, they are seemingly doomed to an eternity in purgatory. However, there is a singular hope for their eternal soul, as spelled out by Hermione Granger at the beginning of Harry Potter and the Deathly Hallows. She read in a book that, once a person fragmented their soul and created a Horcrux, the only way to repair the damage would be to experience true remorse for what they had done. Experiencing such remorse would be devastatingly painful, but if done wholly selflessly, that person would have a renewed soul and be able to pass on to the afterlife.
In the Harry Potter and the Deathly Hallows books, Harry Potter urged Voldemort to feel remorse for his crimes. When they faced off for their final battle, Harry Potter knew that the Dark Lord was about to die, so he told his enemy to "be a man" and attempt to experience remorse for all he had done, saying, "I’ve seen what you’ll be otherwise." He was referring to the pitiful, flayed creature he had seen in the King's Cross Purgatory and wanted to give Voldemort a chance to avoid this. However, this was beyond what Voldemort was capable of, so he suffered a fate worse than death.
Why Voldemort Risked Damning His Soul For Eternity (& Why His Plan Failed)
Dumbledore was always astutely aware of the punishment for murder. It was why he was so determined to ensure that his own death didn't happen at the hands of Draco Malfoy, telling Severus Snape that he would not have the boy's soul ripped apart on his account. Dumbledore also frequently warned Voldemort about what he was risking, reminding the villain in Harry Potter and the Order of the Phoenix that there were fates that would be far worse than dying. However, this was something that the Dark Lord simply couldn't understand.
Voldemort knew the risk of dying with a severed soul, but he was so full of hubris that he didn't think it mattered since he had found a foolproof way to avoid death. One Horcrux would still have been a risk, but the number seven, the most magically significant number, would save him. Voldemort split his soul into seven pieces, one stored in his body and the others stashed away in Horcruxes. He believed this made him truly immortal—entirely protected by the magic of seven.
Voldemort's Magical Number Seven Didn't Work
Though the Harry Potter movies were unclear, Dumbledore clarified in the books that Voldemort only intended to make six Horcruxes, with seven soul fragments in total to provide magical protection. Of course, the Dark Lord didn't realize that he had made a mistake. He unknowingly ripped his soul an extra time, with the eighth piece taking refuge within Harry Potter. Without the number seven, Voldemort's soul was vulnerable, and Harry Potter was able to hunt the Horcruxes down one by one before facing the villain himself. So, though he believed himself immortal, Voldemort died at the end of Harry Potter, and while the souls of his victims carried on in peace, he suffered for all eternity.