From German Emil, from Latin Aemilius, a Roman family name from aemulus ("rival"). Cognate with French Émile.
Like Emile, occasionally used in English since the nineteenth century.
The feminine form Emily has always been more established and popular.