The phrase being reference that seems to refer to a baptism for the dead is in verse 29 of 1Corinthians 15. It should be noted that the seeming linkage between baptism and the dearly departed is found only in this place in the entirety of Scripture.The verse in question is the following.
The quote referring to baptism is, "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?" (1Corinthians 15:29, KJV).
The Mormons use the above verse to justify their teaching that a person who is alive can partake of baptism for or on behalf of someone who is dead. After they perform this ritual, the spirit of the deceased person (according to them) has the power either to accept or reject the ordinance done on their behalf. This group has practiced this ceremony since 1840 A.D.
The belief that the efforts of those still alive (e.g. baptism) can aid the dearly departed is not limited to the Mormons. The Catholic Church also teaches that humans can positively impact the eternal standing of those who have perished.
In their comments on 1Corinthings 15:29 the Catholics state, ". . . the passage at least furnishes historical evidence of the prevalence at the time of belief in the efficacy of works for the dead . . . it is probable that the practice in question was something in itself legitimate, and to which the Apostle gives his tacit approbation." (1913 Catholic Encyclopedia).
The general context of this "baptism" section concerns those in Corinth who heard about Jesus' resurrection but still doubted, if not outright denied, that Christians will someday experience the same thing (1Corinthians 15:12).
Since the Bible nowhere teaches that we have an immortal soul, all humans must be resurrected first before receiving eternal life. A more accurate translation of 1Corinthians 15:29 is the following.
Otherwise, what shall they do who have been baptized for the resurrection of the dead, if the dead are not raised at all? Why then are they baptized for the resurrection of the dead? (1Corinthians 15:29, HBFV).
Paul spends a great deal of time in chapter 15 linking Jesus' resurrection from the dead to our own and only uses baptism to make his point. In fact, he makes the case that the doctrinal foundation of Christianity itself is based on the resurrection. If Christ was not brought back to life then we will not be as well. If this is true, then the Christian faith is a lie and a complete waste of time (1Corinthians 15:13 - 19). Christ, however, was raised from the dead and his life makes possible our life after we have perished (verses 20 - 28).
Paul's "baptism" statement in 1Corinthians 15:29 merely rephrases his argument made a few verses prior. He states, in so many words, that being baptized and receiving God's spirit is made possible because of Christ's resurrection. The Lord's resurrection guarantees our own. It therefore makes no sense for a true Christian to deny Jesus' resurrection which is linked to our own.
Verse twenty-nine of 1Corinthians 15 cannot mean, unless it is twisted, that someone who is alive can be baptized for, or otherwise affect, someone who is dead. Baptism requires a person who is alive repenting of their own sins (and not the sins of others) and accepting Jesus as their personal Savior. It is an individual act that cannot be performed for someone else. Trying to "help" the deceased is also a waste of time since they are not conscious but are unconscious awaiting their return to life.