Perhaps from Middle High German ieman(d)s, originally genitive of ieman (“somebody”), but since the 15th century also attested as basic form. The suffix -er would have been added by analogy with the pronominal/adjectival declension (as also happened in the oblique cases of cognate German jemand); /n/ was lost by dissimilation.
Alternatively from Middle High German (ich) enweiz wer (“I don’t know who”), a common construction expressing indefiniteness, also reduced to neiz wer. Compare Alemannic German neiwer. For the construction see also Old Norse nǫkkurr and Romanianniște. The /m/ would be due to assimilation of -nw-, but the /ts/ (instead of /s/) is difficult to explain with this approach.