Middle English nede, from Old English nied (West Saxon), ned (Mercian) "what is required, wanted, or desired; necessity, compulsion, the constraint of unavoidable circumstances; duty; hardship, emergency, trouble, time of peril or distress; errand, business," originally "violence, force," from Proto-Germanic *nauthiz/*naudiz (source also of Old Saxon nod, Old Norse nauðr "distress, emergency, need," Old Frisian ned, "force, violence; danger, anxiety, fear; need," Middle Dutch, Dutch nood "need, want, distress, peril," Old High German not, German Not "need, distress, necessity, hardship," Gothic nauþs "need").
This is apparently from a root *nauti- "death, to be exhausted," source also of Old English ne, neo, Old Norse na, Gothic naus "corpse;" Old Irish naunae "famine, shortage," Old Cornish naun "corpse;" Old Church Slavonic navi "corpse," nazda, Russian nuzda, Polish nędza "misery, distress;" Old Prussian nowis "corpse," nautin "need, distress," nawe "death;" Lithuanian novyti "to torture, kill," nove "death." As it is attested only in Germanic, Celtic, and Balto-Slavic, it might be non-PIE, from a regional substrate language.
From 12c. as "lack of something that is necessary or important; state or condition of needing something;" also "a necessary act, required work or duty." Meaning "extreme poverty, destitution, want of means of subsistence" is from early 14c.
The more common Old English word for "need, necessity, want" was ðearf, but they were connected via a notion of "trouble, pain," and the two formed a compound, niedðearf "need, necessity, compulsion, thing needed." Nied also might have been influenced by Old English neod "desire, longing," which often was spelled the same. Nied was common in Old English compounds, such as niedfaru "compulsory journey," a euphemism for "death;" niedhæmed "rape" (the second element being an Old English word meaning "sexual intercourse"); niedling "slave."