How long the storm lasted?
It's an incomplete phrase and not set up to a question. Here's why:
You might be thinking that we have the word "how" which is used for questioning, however, in this phrase we want to know about the length of time, or how much time the storm "lasted" and not "how long" the storm was in length of time. There you need a word that indicates this and that would be "did". "How long did the storm last?" Why do we change lasted to last? When you are indicated the length of time in an answer, you use it in the past tense: The storm lasted for five hours. "Did" is already past-tense, therefore you don't need to be redundant with "lasted". You already made it in the past with "did". You could correctly answer also: "The storm did last for five hours." That is if you wanted to keep the same pattern, but you can see that you don't use "lasted" either in the answer when you use "did".
Correct: How long did the storm last?