At first sight and checking out cognates in related Germanic languages, it would appear that the ei-form be a continental German innovation:
However, digging deeper into the predecessors of these words reveals that Proto-Germanic like old Norse and Gothic had a set of three forms that depended on the genus of the word following:
- Reconstructed from Gothic: *twai, *twōs, *twa
- Reconstructed from Old Norse: *twa(a)iʀ, *twa(i)aʀ, *tw(a)u
(Information as given on Wiktionary.)
In fact, the genus-sensitive nature of the word, similar to an article is still reflected in modern-day Faroese and Icelandic:
- Icelandic: tveir, tvær, tvö
- Faroese: tveir, tvær, tvey
And can also be found in old Swedish and old German. Possibly, these forms may be traced back to the old dual numerus which existed in Proto-Germanic (and Proto-Indoeuropean) but has since become extinct in most Germanic (or Indo-European) languages. A dual article would behave like a singular article, and ein, eine, ein is known to be inflected according to genus — although it is more obvious in the demostrative pronouns einer, eine, ein(e)s.
These forms existed as zwēne, zwā/zwō, zwei in old High German ,as twēne, twē, twē in old Dutch. and as twēġen, twā, tū/twā in old English. When losing the dual, Standard German stuck with zwei, Dutch stuck with twee and English with two. However, zwo remained around as an alternate form and similar forms survive in some dialects such as Bavarian (zwoa).