Baptism for the dead is a non-biblical practice where a living person is baptized in lieu of a person that passed away, as a means of making a public profession of faith for a person that is already deceased. We can, essentially, think of it as the practice of baptizing a dead person.
The practice has as its basis the misinterpretation of 1 Corinthians 15:29: “Otherwise, what will they do, those being baptized on behalf of the dead? If the dead are not at all raised, why indeed are they baptized on behalf of the dead?” This is a difficult passage to interpret, but we do know by comparing it with the rest of Scripture that it does not mean that a dead person can be saved by someone else being baptized on his or her behalf, because baptism is not a requirement for salvation in the first place (Ephesians 2:8; Romans 3:28; 4:3; 6:3-4). The entire passage (vv. 12-29) is about the surety of the resurrection, not about baptism for the dead.
What was being baptized for the dead? It is a mysterious passage, and there have been more than thirty different interpretations put forward. 1. The plain meaning of the Greek in verse 29 is that some people are being baptized on behalf of those who have died—and if there is no resurrection, why are they doing this? 2. Either Paul is referring to a pagan custom (notice he uses "they," not "we"), or to a superstitious and unscriptural practice in the Corinthian church of vicarious baptism for believers who died before being baptized. 3. Either way, he certainly does not approve of the practice; he merely says that if there is no resurrection, why would the custom take place? The Mormon practice of baptism for the dead is neither scriptural nor sensible. Baptism for the dead is a practice that was common in the pagan religions of Greece and is still practiced today by some cults; but it doesn’t change a person’s eternal destiny, for that is determined while he lives (Luke 16:26).