It's from Japanese, a wasei kango (和製漢語) formation using on-readings of Chinese characters: 絵 (e, "picture") + 文字 (moji, "script"). The 字 (read ji) is the same as in 漢字 (kanji, "Han characters") and ローマ字 (rōmaji, "Roman characters". Exactly parallel to a neo-Latin / neo-Greek formation like "pictograph" (Latin pictūra, "picture" + Greek γράφω / graphō, "write, draw").
漢字 itself originates from Chinese, where it is pronounced hànzì in Mandarin and hon3 zi6 in Cantonese. It is also used in Korean, where it is pronounced hanja.
In Chinese, 絵文字 is orthographically borrowed as 繪文字 (traditional) / 绘文字 (simplified) — 繪, 絵 and 绘 all being alternate renderings of the same character. It is pronounced huìwénzì in Mandarin and kui2 man4 zi6 in Cantonese, according to the etymology of its constituent characters. In Korean it is borrowed phonetically as 이모지, imoji.
"Emoji" (絵文字) is also a false-friend for "Emoticon". "Emoticon" indicates icons that express emotions (typed with ASCII characters), but "Emoji" is simply the Japanese word for pictograph, and is not derived from the word 'emotion'.