"He is eating an egg."
Translation:Han spiser et egg.
First of all, "egg" translates to "egg" in Norwegian, so its not "ei". Regarding the article, it is "et" and not "en" because the grammatical gender of "egg" is neuter, and the article is in agreement with the noun.
The article used with neuter nouns is et, e.g., et hus / huset; et egg / egget.
The article used with masculine nouns is en, e.g., en bil / bilen.
The en article can also be used with feminine nouns, e.g., en seng / sengen. Alternatively, you can use ei as the indefinite article with feminine nouns, e.g., ei jente, and an a ending for the definite form, e.g., jenta (the girl).