Is this teaching unique to Mormons? In the modern day they are certainly the largest group of practitioners, but there are a few other Christian groups (and even some non-Christian ones) that adhere to a similar belief. However, even though proxy baptism is not common among mainstream Christianity, though there is some serious evidence that it may have been practiced on a large scale in Christianity’s past.
Some claim that justification for proxy baptism can be found in the writings of Paul the Apostle. In 1 Corinthians 15:29 Paul writes, “else what shall they do which are baptized for the dead, if the dead rise not at all? why are they then baptized for the dead?” Whether or not Paul himself believed in the teaching is a matter of much debate, but it does open the door to the idea that this practice is not new.
As early as 208 the theologian Tertullian wrote about the practice among the Marcionites, an early group of dualist Christians. Epiphanius of Salamis visited the same topic sometime in the 370s, attributing the teaching of the doctrine to the ever controversial early theologian Cerinthus. John Chrysostom, an Archbishop of Constantinople, would go even farther in establishing the use of baptism for the dead, relating specific details about the ritual as used by some early Christians.
No matter who started the practice or why, the teaching was popular enough that it became the subject of serious theological consideration by the leaders of the Christian Church. In 393 at the Synod of Hippo it was decided that the sacraments Holy Eucharist and Baptism should not be given to dead bodies, a ruling upheld at the Third Council of Carthage in 397. This marks the departure of baptism of the dead from mainstream Christian practice.
This particular use of the sacrament of baptism would remain dormant until the 1840s, when Joseph Smith received a revelation calling him to restore the practice. He used 1 Corinthians 15:29 as Biblical proof that the practice had been a part of early Christian belief. As The Church of Jesus Christ of Latter Day Saints was a Restorationist movement during the Second Great Awakening, the fact that Baptism for the dead had been outlawed by the corrupted, formalized Christianity was only more proof that it was a valid doctrine.
Unlike some other, more unpopular doctrines (like plural marriage), the modern day Mormon Church has continued to uphold the practice of proxy baptism. It will most likely continue to baptize the dead in the future, though it has promised to crack down on incorrect practices concerning the sacrament.