There is a scripture in Corinthians that says why are they baptized for the dead; what does that mean?
Else what shall they do which are they baptized for the dead, if the dead rise not at all? Why are they then baptized for the dead? (1 Corinthians 15:29)
This passage comes at the end of a section that begins, "But if there be no resurrection of the dead, then is Christ not risen; and if Christ be not risen, then is our preaching vain, and your faith is also vain." (1 Corinthians 15:13-14) The similarity in phrasing indicates that these may be the start and end of one thought. That thought is that Jesus rose from the dead. If there is no resurrection, then Jesus was not resurrected. But that is one of the essentials of the gospel. Jesus died, was buried, arose on the third day, and was seen after his resurrection. (Same chapter, verses 1-8) If Jesus was not raised, we have no hope. The resurrection is the proof that Jesus is the Messiah.
Then comes the verse in question. Who is/are "the dead" in this passage? Is he saying people are baptized on behalf of other people who have died but were not baptized? That is what the Mormons believe. Or is he asking, as I believe fits the context better, "What will we do who were baptized because of Jesus, if he could not have been raised? Why be baptized for a dead man, instead of a resurrected man?" So, I believe "the dead" here is referring to Jesus, not any dead people.