I have named him/he who shall not be named. Which of these is correct? I think it should be "him" because "him" is a direct object in this context. In this context, "him/he who shall not be named" is not a proper noun.
I this case, I believe "He Who Shall Not Be Named" is a set phrase, functioning a bit like proper name in this context. So you won't change that first word of it. Just like you won't change "I have named He-Man" to "I have named Him-Man" - the "He" is part of the object.
It needs to be I have named him who shall not be named. Him is the direct object of the verb in the main clause. The relative clause starting with who identifies the him but does not influence its (object) case.
Here is similar construction:
Note: You can use he in the main clause if he is the complement rather than the object of the verb:
Admittedly, this is formal English and I suspect most people (in the UK at least) would say:
**Edited: See the comment from and to Edwin Ashworth below.
I have named (him/he) (who) shall not be named. The choices are:
I have named him whom shall not be named. and I have named he who shall not be named.
Substituting a different pair;
I have killed (them/those who(m) will not be killed, would become
I have killed them whom will not be killed. or I have killed those who will not be killed.
I have never seen this construction: them whom will not be killed, nor those whom will not be killed. I cannot support this usage.
It seems to be an illogical construction. I think the who complicates the phrase, as well as the implication that you've accomplished the linguistic impossibility.
I would argue that (he-who-shall-not-be-named) is your direct object.
I have named he who shall not be named. (acceptable)
However, as I cannot cite sources, I hope a linguist will hop in on this.
Even though it is a bit of a set phrase, I would decline it (here, decline meaning change the word according to the case in which it is used -- rather than refuse).
Thus, I would say I have named him who shall not be named.
Seeing @AvnerShahar-Kashtan has given the opposite answer, I wonder if it depends on where one learned to speak English or how one speaks English. My English is American English, and I tend to maintain the proper uses of subjunctives and to decline foreign words as they decline in their own languages as best I can when using them in English (i.e. alumni for the plural of alumnus and alumnae for the feminine plural, etc.).