You are presumably referring to Revelation:
Enoch and Elijah:
These two men have a special place in the Scripture record given to us by the Holy Spirit of God (The Author of the Bible, 2Peter 1:20-21).
Their uniqueness is in the fact that both were taken by God to Himself when they still lived!
These actions by God with these two men is different to His general dealings with men, and His statement in Heb. 9:27; NKJV: “And it is appointed for men to die once, but after this the judgment”.
As an aside, the next verse is very precious to true Christians (Christ-ones). Christendom generally is not aware of this future event, and it is not taught from most pulpits; v28; NKJV: “so Christ was offered once to bear the sins of many. To those who eagerly wait for Him He will appear a second time, apart from sin, for Salvation”.
Returning to the main subject, for God to deal as He did with these two men, out of the normal run of men’s lives, and His own statement shown above, means that a special reason is implicated; which must be within the “rules of engagement”, between God and Satan; see Job 1 and 2 and Satan's Motivation:
What stands out in the lives of these two men, is their dedication to serving God by their own free-will and relating to Him in ways totally differently to the population around them, at a time of grievous rebellion against God, resulting in sin and paganism to extreme levels! The sin was so bad that it “grieved God” Gen. 6:6; the whole of Chapter 6 is descriptive of God’s anguish!
Part of the problem was that of the seed of fallen angels with the daughters of men (highlighting the “free-will” of those creatures), and the fallen nature of humans since Adam, both elements encouraged directly by Satan! See: Nephilim; & Nephilim, who were they, and why:
In this scene, Enoch stood out in his dedicated relationship with God, not only in his heart felt worship, but as the corrected AV translation shows, “walked to and fro” with God, Gen. 5:24; which showed a special relationship which continued for 300 years in dire times!
Enoch was thus spared the anguish of what was to happen to all people (including his daughters with fallen angels), prior to the destruction of the flood; of whom only Noah and his family (Gen. 6:9 & 7:1) were not polluted by fallen angel seed (Nephal = to fall)!
In the case of Elijah, again dire Satanic circumstance prevailed in Israel, which is highlighted in IKings 18 when the battle between God’s force, in the person of Elijah and Satan’s in the persons of Jezebel/Ahab (with Jezebel leading) came to a head.
Interestingly, Elijah is accused of being Israel’s trouble v17, when in fact the reverse was the case, which is so often Satan’s ploy! Elijah forcefully rebuts the accusation in v18, and challenges all Satan’s Priests (the Baal’s), in the rest of the Chapter to a duel of power between Baal’s god, and the God of the Jews, Jehovah!
Prior to the contest between the 450 Satanic Priests against Elijah/Jehovah; Elijah gives the people of Israel a chance to stand with him against Satan v21; but none would answer him!
This response is noticeable often in people whose hearts and minds are not stayed on God/ Christ Jesus!
The contest was won with great conviction by Elijah/Jehovah, with Elijah’s outstanding faith showing through to great effect!
The people then run to the side of Jehovah!
Elijah slew all 450 Satanic Priests in v40; which is certainly a precursor to Christ’s work on Earth prior to the Millennial Reign!
Elijah was taken by God “into Heaven” in 2Kings 2:11, and as was the case with Enoch, did not die, at that time!
There will be conditions on Earth in the yet future, when Satan’s forces and evil will abound to at least the level described above, and probably much more so; as the spread will be worldwide, with Israel as the focus and target of Satan wherever they are living, and Scripture is certain in its prediction!
That point is reached in Chapter 11 of Revelation, when “two Witnesses” with special powers of survival, attack, defence and miracle, will stand in Jerusalem to proclaim the Truth of God to all people, and all Satan’s forces, both Jew and Gentile!
Their witness will continue for 1260 days, (3½ years) the same period as Jacob’s Trouble, when they cannot be killed, but they will be when that time is finished and Jehovah Zebaoth’s purpose is completed!
However, 3½ days later, they are revived to life, and ascend into Heaven in the sight of their enemies, which causes great fear amongst the people who have been assailed by the two witnesses, and who are just in the middle of the celebrations of their deaths!
It is speculated that these two Witnesses are Moses and Elijah, and that is one of the most common opinions. That is due mainly to the “Transfiguration” event of our Lord in Matt. 17, just prior to His suffering and death at the hands of the Romans, and by Jewish Sanhedrin at the people’s behest!
Also considered is Malachi 4:4-5, in which Jehovah comments on the two above men, in the context of the preparations for His return to Earth.
As Moses represents The Law, and Elijah the greatest of the Prophets in the view of many, the opinion may have veracity. In fact our own writings on the subject lean to this view, see below:
What is certain is that our Lord’s ref. to Moses is to show the standards which will prevail when He sets up the Millennial Kingdom, in view of what He had just said regarding Israel’s total failures in the previous verses of Malachi! His reference to Elijah is to show the need for a warrior able and willing to combat Satan in the mode seen in Elijah’s earlier life! These facts alone do not conclusively prove that Moses will be with Elijah; in fact the below must be considered as a serious alternative with Enoch!
Extracts from Revelation Chapter 11:3
V.3 (c)And I will add power to (a)My two witnesses, and they shall prophesy a thousand two hundred and threescore days, (b)clothed in sackcloth".
(c)And I will add power to (a)My two Witnesses, and they shall prophesy a thousand two hundred and threescore days, (b)clothed in sackcloth".
(a)"My two Witnesses;" (Zech. 4). Who these two blessed Witnesses are is not known. Some say Moses and Elijah, which may have veracity, as it is certain that Elijah will return to Earth prior to the Day of the Lord", (Jehovah Zebaoth), (Malachi 4:5). It is noteworthy that in the same breath as that promise (Mal. 4:4), Israel is exhorted to remember "the Law of Moses My servant"; so the possibility is distinct. In Matt. 11 Jesus discusses John the Baptist, His own Evidential Miracles prophesied in Isa. 35:5-6, 61:1, and in V.10, the promise of Jehovah to send His Messenger (Mal 3:1). In V. 14 Jesus shows that had the Jewish Hierarchy accepted Him as Messiah, John would have been Elijah! Matt. 11:13 states "For all the prophets and the Law prophesied until John"; meaning that John and his Baptism was a terminal point and a change, but was not accepted by the Sanhedrin; as also was the rejection of Jesus as Messiah finally at Acts 28:25-28. Because of these facts, prophecies concerning the Jews are delayed until after the Gentile Age; and the Grace period is complete in the future, (2014).
Jesus showed that He was that change, but it had to be accepted by the Nation of Israel! The offer of the Jer. 31:31 New Covenant was not withdrawn until Acts 28:28. The Two Witnesses will represent the same offer, together with the Kingdom, so the possibility is that Moses is one to represent the Law and Elijah the second representing the offer of Jer. 31:31. However, the consensus view is they are Enoch and Elijah, as they had not died!
The fact of their rejection of Jesus as Messiah may be the reason as we know from Ezekiel, that during the Millennial Reign the Jews will perform the rituals of the Law, other than the symbols of Messiah (incense alter, etc.).
Scripture says they "are the two anointed ones, that stand by the Lord (Adon) of all the Earth," (Zech. 4:14). Their purpose is to faithfully pronounce "the Kingdom", as did our Lord during His Earthly Ministry (Rev. 1:5). They will also witness to the fact that Jesus of Nazareth is the Messiah the Jews rejected! They will have special powers of survival and miracle, which will anger and unsettle the followers of Antichrist (Satan's people) on Earth, especially as they cannot be killed until their mission is complete; their witness time period is exactly the same as the Nations control of Jerusalem!
(b) Sackcloth; camel haircloth, worn by mourners, and a symbol of sorrow and mourning; and a sign of rejection of all the world's wealth, pleasure and power; which is 'Mystery Babylon', and Satan's!
(c) Here again the Almighty Jehovah Zebaoth, shows measured empowerment for the Purpose! In this case, so that the "Witnesses" may without any hindrance continue to give the Message of Jehovah God to the Jews and the world. It has to be remembered that the "Message" will include the fact of Jesus of Nazareth as Messiah! The many Jews will not want to hear this"! So, they with the help of non - Jews will try to kill the Witnesses! They will not be able to do it for 3½ Jewish years, due to God's Protection and Empowering; this fact will make all the world's anti-God people very angry; but also afraid!
However, as said above, another very real possibility is that of Enoch and Elijah, due to their very courageous stand at very dangerous times against Satan and his forces earlier in history!
Much is at stake in God’s battle for righteousness to win and prevail on Earth! The fact of their previous unique and faithful stands against Satan; and their trust in God’s power and supremacy, makes them prime candidates for the “Witnesses” in that perilous time in the “end Age” events of Revelation.
A further and quite strong point as mentioned earlier, is that they had not died in the way of all flesh since Eden. As is seen in the “Witnesses” in Jerusalem, they die after their mission is ended, which in the case of Enoch and Elijah would be their first and “normal” death!