I was just reading about this a few days ago while studying post-apostolic history. While I can't say I have any mastery over the topic, I think this article is interesting:
David W. T. Brattston - References
Clement of Alexandria, Saint (ca. AD 153 to 217)
The Excerpta ex Theodoto, edited with translation, introduction and notes by Robert Pierce Casey (London: Christophers, 1934) Series: Studies and Documents, vol. 1
Clement of Alexandria, Saint (ca. AD 153 to 217)
Extraits de Théodote: texte grec, introduction, traduction et notes de François Sagnard (Paris: Cerf, 1970) Series: Sources chrétiennes no. 23
Irenaeus Against Heresies 1.27.1-2, 4 in The Ante-Nicene Fathers; Translations of The Writings of the Fathers down to A.D. 325, edited by Alexander Roberts and James Donaldson. American reprint ed. by A. Cleveland Coxe (Buffalo, NY: Christian Literature Publishing Co., 1885-96; reprinted Grand Rapids, Mich.: Wm. B. Eerdmans, 1985) vol. 1 pp. 352f.
Karen L. King “Valentinus” in Encyclopedia of Early Christianity, edited by Everett Ferguson (New York: Garland, 1990)
Robert Rea “Theodotus” in Encyclopedia of Early Christianity, edited by Everett Ferguson (New York: Garland, 1990)
Hendrik F. Stander “Marcion” in Encyclopedia of Early Christianity, edited by Everett Ferguson (New York: Garland, 1990)
Tertullian Against Marcion 5.10 in The Ante-Nicene Fathers; Translations of The Writings of the Fathers down to A.D. 325, edited by Alexander Roberts and James Donaldson. American reprint ed. by A. Cleveland Coxe (Buffalo, NY: Christian Literature Publishing Co., 1885-96; reprinted Grand Rapids, Mich.: Wm. B. Eerdmans, 1986) vol. 3 pp. 449f.
Only Latter-Day Saints baptize living people on behalf of the dead. The LDS maintain that such baptism is endorsed by the Scriptures and was part of the original Christian faith as established two thousand years ago. However, a study of Christian antiquities reveals that baptism for the dead was not practiced by the first followers of Jesus and had a very different meaning from that given to it by Joseph Smith Jr. "It is the unanimous testimony of the Apostle Paul and the early church fathers Irenaeus, Clement of Alexandria and Tertullian that baptism for the dead was not a practice of apostolic Christianity."
The article “Did Jesus Establish Baptism for the Dead?” by Luke P. Wilson elsewhere on this website discusses 1 Corinthians 15.29, which is the verse Mormons cite for support of their practice. At page 4 of 14 Wilson states “as we shall see, baptism for the dead is linked by the apostle [Paul] to an errant group within the Corinthian church, whose false teaching the entire fifteenth chapter of 1 Corinthians—including verse 29 aims to correct.” At pages 7 and 8 he identifies them with “false teachers”, without going into great depth about the cults they represent or their background teachings. The present article expands upon some of Wilson’s points and gives details about them as evidenced in ancient Christian sources close in time and geography to these teachers.
Are living Christians to be baptized on behalf of the dead? The only Scripture passage cited in favour of such an idea is 1 Corinthians 15.29: 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? (KJV)
The concept is not mentioned elsewhere in the Bible or in other early Christian documents, with two exceptions. If it had been as important or as frequent a part of the original Gospel as it is to one of our latter-day denominations, we would expect to find many references to it in writings by Christians who lived a short time after Jesus. Yet, barring one reference by Clement of Alexandria in Excerpt 22 of Excerpta ex Theodoto and one by Tertullian in Against Marcion 5.10, 1 Corinthians 15.29 stands alone in the age of Saint Paul and for centuries afterwards,
Clement of Alexandria lived from about AD 153 to 217. A native of Greece, he travelled the Christian world before settling in Egypt, where in the AD 190s he was the principal or dean of Christianity's foremost theological school and one of the most prominent Christian teachers of his age. He was well versed in the science of the day, in philosophy and in religion, including Christian sects. Among his writings against paganism and deviations from Christianity, he mentioned baptism for the dead as a tenet of a particular Gnostic sect.
“Gnostic” meant a person who claimed to possess a secret religious knowledge. The Gnostics were a strange species of Christians, if they were Christians at all. They believed that only the spirit is good and pleasing to God and that all matter is evil and death. The very origin of matter was evil and not from God. The Gnostic group encountered in the Excerpta ex Theodoto was that of one Theodotus, who taught that there were an original divine mother and father who gave birth to other spirit beings. Rebellious and envious, their youngest great-granddaughter attempted to imitate their action of producing spirit children. She did such a bad job that in addition to (good) soul and spirit she gave birth to (evil) matter. Her action created a separation from the first divine parents. Moreover, in some instances matter and spirit were mixed in such a way that particles of soul and spirit were trapped in material human bodies. Other particles of spirit escaped and continued in the purely spiritual form of angels. In order to liberate themselves from their bodily prisons of flesh and death to be reunited with the first parents (be saved), members of Theodotus' sect relied on absorbing a body of secret knowledge about angels, gods, and other spirit beings and about what was referred to as “baptism for the dead”.
Clement's Excerpta ex Theodoto relates that Theodotus’ Gnostics believed that the ones who are baptized in 1 Corinthians 15 are angels, spirit creatures who had escaped imprisonment in matter. Only pure spirit beings are truly alive and only they can begin the redemption process. The ones for whom they are baptized are human beings, whom Theodotus’ group considered to be dead due to being trapped in bodies of flesh. An angel must first be baptized in heaven on behalf of a “dead” human, followed by the human's own baptism on earth. Being prisoners of the flesh and the material world and dead to the spiritual, humans cannot start the process. According to Clement, 1 Corinthians 15.29 refers to this Gnostic concept. Neither Paul, Clement, nor the Gnostics taught that humans still in material bodies were baptized for deceased humans.
To Theodotus' Gnostics, “resurrection” meant that the soul is freed from the body and raised up to equality with the angels in a purely spiritual world, a world of true life with the original divine spirit parents. Note also that one of the main themes in 1 Corinthians 15 is the resurrection and incorrect views about it. It is not a discussion about baptism. It does touch on baptism for the dead but only secondarily to the resurrection of our material bodies; Paul mentions baptism for the dead only as part of an argument against the Gnostics' eccentric notions on the resurrection, in order to turn their theories against them.
The strange dogmas described in Excerpta ex Theodoto were based on the secret knowledge Gnostics claimed they alone possessed. Paul's warning in 1 Timothy 6.20 against “what is falsely called knowledge” (RSV) indicates that the Apostle both knew about and opposed Gnosticism, including the idea of angelic baptism for the spiritually dead and other Gnostic tenets described by Clement 150 years later. Paul's counsel in 1 Timothy 1.4 and Titus 3.9 to avoid "endless genealogies" remind us of both the Gnostics' lines of descent from the original spirit parents and also the archival research of modern-day practitioners of baptism for the dead.
Briefly, what 1 Corinthians 15.29 refers to is this Gnostic concept. Neither Paul nor the Gnostics taught that humans still in material bodies were baptized for deceased humans. Note that 1 Corinthians 15.29 does not ask “what shall we do which are baptized for the dead” but rather “what shall they do”. The Excerpta ex Theodoto indicates that “they” are the angels, not Christians on earth. Such “baptism for the dead” was not a standard or apostolic Christian doctrine but a Gnostic one, which Paul and Clement used against these heretics.