This is such a great question and thanks for your thoughtful response @lakshmi.
As I began to reflect on this question, I put in a search on baptism of the dead, to see if there have been any conversations on this in the past and found @Alison and @Carson’s responses in this discussion of 1 Cor 15:29 to be a really helpful starting point. This is verse is the only mention of baptism for the dead in the dead in the Bible, so it’s a good verse to sit with when trying to understand what is meant by “baptism for the dead” and whether its something the Bible commends or not.
From @Carson’s response in the linked discussion I found Thiselton’s Commentary on 1 Corinthians in the NIGTC series, which I highly recommend. He has a whole section on the multiple interpretations of the verse, to my count, he walks through 18 different interpretations in-depth, and speaks of others who have given counts of 40 or more interpretations.
Even before all those interpretations, as @Lakshmi shared well, there’s also the question of whether the practice described (whatever it is) is one of which Paul approves or not.
As for what this practice is, it helps to look at some of the different interpretations and where they’re coming from. The phrasing in Greek is “Ἐπεὶ τί ποιήσουσιν οἱ βαπτιζόμενοι ὑπὲρ τῶν νεκρῶν;” and almost every word has debates on the particular meaning or nuance it has in this verse.
οἱ βαπτιζόμενοι could mean those who wash ceremonially (such as the ritual hand washings of the Pharisees and perhaps here conceivably a ceremonially washing of dead bodies in preparation for the resurrection), though I think a reference to people who preform the sacrament of baptism is much more likely than ceremonial washings here.
Even so, the baptism could be metaphorical. Thiselton, in his commentary, says that Lightfoot “understood τῶν νεκρῶν to refer to the dying martyrs, and interprets baptism metaphorically to refer to the baptism of suffering and martyrdom” (p. 2077 Kindle Ed.). This metaphorical interpretation of Baptism would fit nicely with Paul’s earlier discussion of his own suffering and danger, but I’m not sure if τῶν νεκρῶν is used to refer to martyrs elsewhere and Thiselton finds that meaning unlikely.
Then there is the question of who or what is meant by “the dead” τῶν νεκρῶν, Lightfoot proposed the martyrs, others have proposed the dead above (ὑπὲρ) whose graves people were being baptized (Thiselton refers primarily to Grosheide’s 1971 commentary on the First Epistle to the Corinthians in the NICNT series 372-373 for this view), those who are about to die, those who are dead in their sins (and thus washed clean by the baptism), or believers in Christ who died before they were baptized, or just generally believers in Christ who have died.
And finally the biggest question is what is meant by the word ὑπὲρ. The use of ὑπὲρ to mean “above” would typical be followed by the accusative, which is not the case here so it seems unlikely. The main debate then is whether it means “on behalf of”/“in the place of,” showing a representative or substitutionary role, or if it means “for”/“for the sake of” which is more about it being in the interest of those who died.
For myself, I think the most convincing interpretation is the one @Carson shared in the linked post, which uses that last meaning of ὑπὲρ. This view is Thiselton’s conclusion in his commentary for which he credits G.G. Findlay:
“Paul is referring rather to a much commoner, indeed a normal experience, that the death of Christians leads to the conversion of survivors, who in the first instance ‘for the sake of the dead’ (their beloved dead) and in the hope of reunion, turn to Christ — e.g., when a dying mother wins her son by the appeal ‘Meet me in heaven!’ Such appeals, and their frequent salutary effect, give strong and touching evidence of faith in the resurrection’” (Thiselton, 1 Corinthians, p. 2084 Kindle Ed.).
Here οἱ βαπτιζόμενοι would mean “those who baptize themselves,” ὑπὲρ would means “for the sake of,” and τῶν νεκρῶν would mean “the Christian dead” as Paul speaks of those who turn to faith, believe, and are baptized in obediece, whose faith grew first from the exhortation of Christians who died before them and from the hope of being reunited with these loved ones who have died as Christians.
If this interpretation is correct, then yes, I would say that sort of baptism is biblical. God uses many things to draw people to himself at first, and if that interest sparks genuine faith that results in the believer acting out their obedience through being baptized, well we rejoice anytime someone believes and is baptized! Regardless of whether Paul explicitly approves the practice here or not, the baptism of oneself following one’s turning to Christ is the same baptism spoken of and commended throughout the Bible and so would be biblical.
If, however, one interprets the baptism as being done in the place of the dead, for the dead person’s faith and/or salvation rather than their own, I do not believe that practice would be biblical. @lakshmi shared a great scripture showing that it is too late to turn to God after one’s death in Heb 9:27-28 and to that I would also add Jesus’ parable of the rich man and Lazarus (Luke 16:19-31) especially verses 22-26:
The time came when the beggar died and the angels carried him to Abraham’s side. The rich man also died and was buried. In Hades, where he was in torment, he looked up and saw Abraham far away, with Lazarus by his side. So he called to him, ‘Father Abraham, have pity on me and send Lazarus to dip the tip of his finger in water and cool my tongue, because I am in agony in this fire.’ “But Abraham replied, ‘Son, remember that in your lifetime you received your good things, while Lazarus received bad things, but now he is comforted here and you are in agony. And besides all this, between us and you a great chasm has been set in place, so that those who want to go from here to you cannot, nor can anyone cross over from there to us.’
The rich man’s choices during his life determined his judgement and now there is no crossing over from where he is at. In this case, the lack of any explicit commendation of the practice by Paul and its conflict with the rest of the biblical text would point to the practice being unbiblical.
In additional to the scriptural conflicts, this kind of practice was known to and condemned by the early church fathers who spoke of it. It was also rejected by these church fathers as an interpretation 1 Cor 15:29. As Hans Conzelmann states in his 1975 commentary in the Hermeneia series, A Commentary on the First Epistle to the Corinthians,
“Some of the church Fathers are familiar with vicarious baptism as a heretical practice; thus Chrysostom knows of it as a custom of the Marcionites. On the other hand, the Greek church Fathers are united in offering a different exegesis: the νεκροί, ‘dead,’ are the σώματα ὑπὲρ ὧν βαπτιζόμεθα, ‘the bodies because of which we are baptized’” (Conzelmann, p. 276).
And so it would seem that the Greek church fathers are in agreement with the conclusion of Thiselton.
These perspectives were all helpful to me in working through this and so hope you’ll find them helpful as well! If you’re interested in diving in deeper, I can’t recommend Thiselton’s section in his commentary enough, it is so thorough and thoughtful and points to a lot more resources you could look into too!
I’m also looking forward to hearing more perspectives others have found helpful or which views others have found most convincing and why. It’s a difficult and confusing topic and it’s been really helpful to hear from and reflect with others