After ending the Apocalypse by locking Lucifer in his Cage once more, the angel Castiel entered a civil war with the archangel Raphael for control of Heaven. In order to combat the much more powerful archangel, Castiel formed an alliance with the King of Hell Crowley to locate Purgatory and split the souls found there between them to consolidate their power. After searching for a long time, the angel and the demon were able to find a way to open Purgatory by torturing Eleanor Visyak who was a monster from Purgatory accidentally released by H. P. Lovecraft. Castiel eventually betrayed Crowley and took the souls for himself, using their power to kill Raphael before declaring himself the new God.
Unknown to Castiel, along with the souls of the monsters who were in Purgatory from being killed on Earth were the Leviathans, the first monsters and one of God's first creations. As Castiel rampaged across the world as the new God, the Leviathans slowly began to influence the angel, making him slaughter a senator's campaign office and causing his vessel to begin to deteriorate. Realizing he was out of control and following a prayer made by Sam Winchester, Castiel agreed to return the souls to Purgatory. With the help of the Winchesters and Bobby Singer, Castiel apparently succeeded in returning all of the souls to Purgatory but discovered too late that the Leviathans had hung on inside of him.
Taking full control of Castiel's body, the Leviathans tell the Winchesters and Bobby that Castiel is dead and they are going to "have so much fun." However, their presence causes Castiel's vessel to start to fall apart and they retreat into a nearby reservoir. There, the Leviathans' presence causes Castiel to implode, killing him while releasing the Leviathans into the world as a wave of black goo.
After being killed by the Leviathans during their escape, Castiel is resurrected by God with his full power and angel status intact, but with no memory of his past. After stealing the Leviathan Tablet, the Winchesters are able to find a weapon capable of killing Leviathans and with the help of Castiel and Meg, use it to kill the Leviathan leader Dick Roman, effectively neutralizing the threat posed by the Leviathan.