5:24

וַיִּתְהַלֵּךְ חֲנוֹךְ אֶת־הָאֱלֹהִים וְאֵינֶנּוּ כִּי־לָקַח אֹתוֹ אֱלֹהִים׃

And Chanoch walked with the Almighty, and he was no more, for the Almighty took him.

Bereshit 5:24

וַיִּתְהַלֵּךְ חֲנוֹךְ אֶת־הָאֱלֹהִים

Bereshit / Genesis 5:24 · Sod

Bereshit 5:24

וַיִּתְהַלֵּךְ חֲנוֹךְ אֶת־הָאֱלֹהִים וְאֵינֶנּוּ כִּי־לָקַח אֹתוֹ אֱלֹהִים׃

And Chanoch walked with the Almighty, and he was no more, for the Almighty took him.

Sod סוֹד

Gathered while it still smells sweet

The Zohar answers the same question as the midrash, but with a parable from the Song of Songs: a king at his feast, a nard that gave its scent, and a gardener who picks lilies. And then Rabbi Elazar tells what Chanoch received in heaven.

Rabbi Yose opens with the verse "while the king was at his feast, my nard gave its scent". Such is the way of the Holy One, blessed is He: when a man cleaves to him and he knows that in time the man will spoil, he hurries to gather his sweet scent and takes him from the world. "The king" is the Holy One, blessed is He, "at his feast" is the man who cleaved to him, "my nard gave its scent" is his good deeds, because of which he leaves the world before his time. So with Chanoch: the Holy One, blessed is He, saw that he would spoil, and gathered him first, as it is said "to gather lilies". Rabbi Elazar says something else: the Holy One, blessed is He, took Chanoch from the earth, raised him to the heights of heaven and handed him all the supernal treasures and forty-five keys of hidden engravings that the supernal angels use.

How Zohar explain it

Zohar And Chanoch walked with the Almighty, and he was no more, for the Almighty took him

Rabbi Yose opened: "while the king was at his feast, my nard gave its scent" (Shir HaShirim / Song of Songs 1:12). This verse has been explained. But come and see: such is the way of the Holy One, blessed is He. At the hour when a man cleaves to him, and he sets his dwelling upon him, and knows that after a time he will spoil, he hurries and gathers his sweet scent before that and takes him from the world.

Of this it is written: "while the king was at his feast, my nard gave its scent". "While the king": this is the Holy One, blessed is He. "At his feast": this is the man who cleaved to him and walks in his ways. "My nard gave its scent": these are the good deeds in him, because of which he will be taken from the world before his time comes.

Zohar Come and see

Chanoch was righteous, and the Holy One, blessed is He, saw that later he would spoil, and gathered him before he spoiled. Of this it is written: "and to gather lilies" (Shir HaShirim / Song of Songs 6:2). Since they give a sweet scent, the Holy One, blessed is He, gathers them before they spoil. "And he was no more, for the Almighty took him." "And he was no more": to live long days like the other people, who lived long. Why? Because the Holy One, blessed is He, took him before his time came.

Rabbi Elazar said: Chanoch the Holy One, blessed is He, took from the earth and raised him to the heavens of the heights and handed into his hand all the supernal treasures and forty-five keys of hidden engravings that the supernal angels use. And all of them were handed into his hand. And we have already established this.

Takeaway

"While the king was at his feast, my nard gave its scent": the words of the bride in the Song of Songs (Shir HaShirim / Song of Songs 1:12). Nard (נֵרְדְּ) is a fragrant oil. The Zohar reads "gave its scent" as "gave all its best", after which only spoiling remains.
"My beloved went down to his garden, to graze in the gardens and to gather lilies" (Shir HaShirim / Song of Songs 6:2). The Zohar reads the gardener as the Holy One, blessed is He, and the lilies as the righteous, whom he picks while they are fragrant.
Between the two parts the Zohar brings the verse "there are righteous to whom it happens according to the deeds of the wicked" (Kohelet / Ecclesiastes 8:14): the early death of a righteous man so that he does not spoil, and the long life of a wicked man so that he returns or so that worthy sons are born from him.
"Forty-five keys": in the text of the Zohar the number stands in letters, mem (מ) and he (ה), 45. It is the number of the word "man" (אָדָם): alef 1, dalet 4, mem 40. The Zohar does not explain the link, this is the translator's observation.
Chanoch in heaven: the tradition that Chanoch became the angel Metatron is known from late midrashim and from the Zohar. Rabbi Elazar speaks only of the treasures and keys handed to him.
Rabbi Elazar in the Zohar is the son of Rabbi Shimon bar Yochai.