Raiden was the protector of Earth essence for thousands of years. He was also born as the god of thunder. Raiden decided to merge Outworld with Earthrealm. He was forbidden to do that without Mortal Kombat tournament.
He could only decide who may or may not represent Earthrealm in the tournament. But in the last Mortal Kombat tournament he began to see the visions of himself from the possible future, where the realms were brought to an armageddon and he was killed by Shao Kahn who had finally won an ultimate prize.
In fact he was being manupilated by the illusions of sorcerer Quan Chi. Raiden at first tried to fulfill those visions, but every time the cracks of his amulet became bigger. Soon he realized that he was doing all wrong. After Liu Kang defeated Shao Kahn in Outworld, the emperor became obsessed with avenging his defeat. And when Shang Tsung resurected Queen Sindel in Earthrealm, Shao Kahn finally started conquering Earthrealm.
Raiden talked to the Elder Gods for aid, but they refused to interfere unless the essence of Earthrealm is concerned. Raiden soon understood their meaning, he had to lure Shao Kahn to killing him, rather than sending the defenders of Earthrealm to kill Shao Kahn. But Liu Kang rebels against him, and their conflict results with Liu Kang's death. In the end Shao Kahn fights him and Raiden eventually uses one last suicidal blow to kill him. But before Shao Kahn could kill him, the Elder Gods finally interfere and destroy Shao Kahn. Raiden in his last breath gives his titul as the protector of the Earth essence to John and Sonya.