Baptism for the Dead
In the Holy Bible in John 3:3-5 it reads: "Jesus answered and said unto him, Verily, verily, I say unto thee, Except a man be born again, he cannot see the kingdom of God. Nicodemus saith unto him, How can a man be born when he is old? Can he enter the second time into his mother's womb, and be born? Jesus answered, Verily, verily, I say unto thee, Except a man be born of water and of the Spirit, he cannot enter into the kingdom of god."
The Mormon Church believes that the first step toward returning to live with Heavenly Father and Jesus Christ is baptism. Many people have lived on the earth at times when baptism has not been available or have died before they had a chance to learn about the gospel of Jesus Christ and to be baptized by one holding the proper authority, that of the Melchizedek Priesthood. In the spirit world, the gospel is "preached to those who [have] died in their sins, without a knowledge of the truth, or in transgression, having rejected the prophets. These [are] taught faith in God, repentance from sin, vicarious baptism for the remission of sins, the gift of the Holy Ghost by the laying on of hands, and all other principles of the gospel that [are] necessary for them to know in order to qualify themselves that they might be judged according to men in the flesh, but live according to God in the spirit."1
Those in the spirit world can accept the gospel. However, they cannot receive the priesthood ordinances for themselves because they do not have physical bodies. In the Mormon temple, these ordinances are performed for those who have passed on. All have the opportunity to accept or reject the gospel even after they have passed on.
God revealed this work of 'baptism for the dead' to the Prophet Joseph Smith in September 1842 and is now contained in Doctrine and Covenants 127-128. (This is an ordinance that was on the earth and was revealed to Christians shortly after the Resurrection of the Savior. But, was taken off the earth during the Great Apostasy, 2 and was later restored to the Prophet Joseph Smith).
Several years earlier, the Prophet Joseph Smith had received a vision of the celestial kingdom in which he saw his brother Alvin who had died. His brother had not been baptized and the Prophet knew that no man could enter the Celestial Kingdom without baptism. God explained to the Prophet that all people 'who would have received the gospel, been baptized, and lived righteously if they had been given the opportunity will be able to be in the celestial kingdom.'3 The prophet Joseph Smith learned that those living on earth could perform the baptisms for the dead in the temple. In other words, the work would be done vicariously, using people on the earth as proxies. (vicariously: a person does something in place of someone else. Proxy: the person doing the work or activity.)
In the Mormon temple we can be baptized for those who have died without being baptized. We serve as proxy for these people; we are the ones that go down into the water and are baptized, but they are the ones for whom the baptism counts.
The Prophet Joseph F. Smith, the sixth President of the Church received a revelation in 1918 explaining further what happens to those who die without baptism. This revelation is recorded in Doctrine and Covenants 138. President Smith saw Jesus Christ and some of his followers in the spirit world. Jesus organized his followers to teach the gospel to people who had not had the opportunity to learn about it and be baptized before they died. These teachings prepared the people to accept the vicarious baptisms that would be done for them.
Mormons know that God has given them instructions to see that all their ancestors have the ordinance of baptism performed for them. Other ordinances which are done in the Mormon temple, such as being sealed to families for time and eternity is vital so that all righteous family members can live together as families and with their Heavenly Father and Jesus Christ.
1 "True to the Faith", a gospel reference, pg 62; "Book of Mormon", Doctrine and Covenants 138:32-34
2 "Holy Bible", King James Version, 1 Corinthians 15:29
3 "Book of Mormon", Doctrine and Covenants 137:7
Other interesting sites about Mormonism: