Wikipedia
Baptism for the dead, vicarious baptism or proxy baptism today commonly refers to the religious practice of baptizing a person on behalf of one who is dead—a living person receiving the rite on behalf of a deceased person.
Baptism for the dead is best known as a doctrine of the Latter Day Saint movement, which has practiced it since 1840. It is currently practiced by The Church of Jesus Christ of Latter-day Saints (LDS Church), where it is performed only in dedicated temples, as well as in several other current factions of the movement. Those who practice this rite view baptism as an essential requirement to enter the Kingdom of God, and therefore practice baptism for the dead to offer it by proxy to those who died without the opportunity to receive it. The LDS Church teaches that those who have died may choose to accept or reject the baptisms done on their behalf.
The modern term itself is derived from a phrase "baptised for the dead" occurring in one verse of the New Testament , though the meaning of that phrase is an open question among scholars. Early heresiologists Epiphanius of Salamis (Panarion 28) and Chrysostom (Homilies 40) attributed the practice respectively to the Cerinthians and to the Marcionites, whom they identified as heretical " Gnostic" groups. For that reason, the practice was forbidden by the early Church, and is therefore not practiced in modern mainstream Christianity, whether Oriental Orthodox, Eastern Orthodox, Roman Catholic, or any Protestant churches.