Our word cannabis—as in the scientific names for Cannabis sativa or Cannabis indica—comes ultimately from Greek ἡ κάνναβις (or, depending on whom you read, ἡ κανναβίς with different accentuation). Herodotus mentions the plant—
ἔστι δέ σφι κάνναβις φυομένη ἐν τῇ χώρῃ πλὴν παχύτητος καὶ μεγάθεος τῷ λίνῳ ἐμφερεστάτη.
[The Scythians] have kánnabis growing in the country, very much like flax except for its thickness and height. (Histories 4.74)
—although the word itself is not of Greek origin, but from some Indo-Iranian language (perhaps even Scythian; cf. Ossetian гӕн and Kurdish kinif). A yet more ancient origin may have been Akkadian qunnabu ‘hemp’ (which takes the determinative ŠIM, for plants and seeds).
The Indo-Iranian language of origin also loaned the word into that dialect-group of Indo-European that was to become Germanic. As a result, the word cannabis—or *kánabis, as it must have sounded when it was borrowed into pre-Germanic—is an outstanding illustration of Grimm’s law:
We can surmise from attested forms that Germanic *hanapiz must have had a competing form *hanipiz. From the former we get Old Icelandic hampr, Old High German hanaf (and German Hanf), Old Saxon hanap, Middle Dutch hannep, Old English hænep.
From *hanipiz, we have Middle Dutch hennep (whence Dutch hennep), and Old English henep, whose descendant is modern English hemp.