A manga character says this to someone who told him to
言われなくてはならない and if it is, how can it be part of a question (with "nan de")? I don't really understand this sentence at all.
First, understand that やめろ is a really raw/strong/rude way to say "Stop (it) !" so I won't translate it to keep the strong meaning. (Other answers are missing this important fact. The speaker does not complain about being told to stop, but the way he is being told to stop.)
With your context, this sentence would mean: Why do you have to go this far by telling me やめろ. (ie: You could have been more gentle, a softer way to say this blabla....)
なんで sets the question. やめろまで up to "やめろ" 言われなくちゃなんねェんだよ splited is like this 言われなくちゃ: 言われなくては なんねェ: ならない んだよ: のです いわれる: to be told いわれなくてはならない => I have to be told
It's kind of Why do I have to be told things this far/rude as やめろ.
なんで: why やめろまで: up to "stop it" 言われなくちゃなんねェ => 言われなくてはならない: it needs to be said / [someone] needs to be told ("it won't do if not said") んだよ!! => のですか: is it?
Why does "stop it" even need to be said!?
The sentence itself does not define who is being told やめろ、so if the person being told やめろ says this as you indicate, it would mean:
Why do I even have to be told to stop?
If the other person is doing something that the speaker doesn't like, but he/she doesn't stop until told to by the speaker, the same thing would mean:
Why do you even have to be told to stop?
Kakashi: "Meh! There's no need for you lot to return to Ninja school."
カカシ「……そう 3人とも… 忍者をやめろ！」
Kakashi: "...Yeah, the three of you... Quit (training to become) ninja!"
Naruto: "Why must you go so far as to tell us to quit!"
Kakashi: "Every single one of you, you're brats who're unqualified to become ninja!"
Here's a breakdown of that sentence:
なんで やめろまで 言われなくちゃなんねェんだよ!!
Literal translation: "Why [must you/do you have to] go so far as telling us 'quit'!"
なんで means "why".
やめろ is quite strong, it could be an imperative of "quit!" or "stop!".
まで can mean "as/so far as" as well as "until, till doing".
言われなくちゃなんねェ is a more colloquial and more emphasized form of (the already colloquial)
言われなくちゃならない, which is
...言われなくてはならないのよ！ all mean "Why must you to go so far as telling us 'quit'!".