From Old English ing.
From Pitman em and en, which it is related to phonetically and graphically, and the sound it represents. The change in vowel probably reflects the familiar suffix -ing.