Where did Moses give the warning that is mentioned in Leviticus 10:3?
While it’s possible that Moses was directly quoting something that God literally said but was nowhere previously recorded in the scriptures, it seems more likely he simply paraphrased key aspects of the previous commandments of God. So perhaps the quotations in the English may be a little misleading.
Let’s take another look at Leviticus 10:1-3
1Now Nadab and Abihu, the sons of Aaron, took their respective firepans, and after putting fire in them, placed incense on the fire and offered strange fire before the LORD, which He had not commanded them. 2And fire came out from the presence of the LORD and consumed them, and they died before the LORD. 3Then Moses said to Aaron, “It is what the LORD spoke, saying,
‘By those who come near Me I will be treated as holy,
And before all the people I will be honored.’”
So Aaron, therefore, kept silent.
Again I don’t think we should be looking for exact quotes but instead the essential message and warning of Leviticus 10:3 communicated previously within the word of God.
Now the first severe warning given about the dangers of dwelling in the presence of God was given in Exodus 19:
10 the Lord said to Moses, “Go to the people and consecrate them today and tomorrow, and let them wash their garments 11 and be ready for the third day. For on the third day the Lord will come down on Mount Sinai in the sight of all the people. 12 And you shall set limits for the people all around, saying, ‘Take care not to go up into the mountain or touch the edge of it. Whoever touches the mountain shall be put to death.
21 And the Lord said to Moses, “Go down and warn the people, lest they break through to the Lord to look and many of them perish. 22 Also let the priests who come near to the Lord consecrate themselves, lest the Lord break out against them.”
So God warned that the people were to consecrate themselves or set themselves apart or otherwise be holy - and yet still they could not touch the mountain that God had descended upon without risking death. Even the priest needed to conduct themselves in a holy manner or risk being consumed by the Lord when drawing near to him. So the warning is clear: The presence of God among the people was very dangerous and a holiness code was required for God to dwell in their presence.
So previously, God informed the Israelites that their holiness was conditioned upon them obeying God and keeping His covenant:
5 Now therefore, if you will indeed obey my voice and keep my covenant, you shall be my treasured possession among all peoples, for all the earth is mine; 6 and you shall be to me a kingdom of priests and a holy nation. These are the words that you shall speak to the people of Israel.”
Which the people agreed to do:
8 All the people answered together and said, “All that the Lord has spoken we will do.” And Moses reported the words of the people to the Lord.
So by the LORD, who was coming, requiring the people consecrate themselves, He required those who draw near to acknowledge the holiness of God. By requiring that they obey His commands, God required that they show Him reverence and honor.
Concerning the temple, God made it clear that it would also be designated as sanctified since it was there He would dwell among the people in Exodus 29:
43 There I will meet with the people of Israel, and it shall be sanctified by my glory. 44 I will consecrate the tent of meeting and the altar. Aaron also and his sons I will consecrate to serve me as priests. 45 I will dwell among the people of Israel and will be their God.
And in Exodus 30, God commands that once the temple and all the items within it are anointed with holy oil, whatever touches them must be holy:
25 You shall make of these a holy anointing oil, a perfume mixture, the work of a perfumer; it shall be a holy anointing oil. 26 With it you shall anoint the tent of meeting and the ark of the testimony, 27 and the table and all its utensils, and the lampstand and its utensils, and the altar of incense, 28 and the altar of burnt offering and all its utensils, and the laver and its stand. 29 You shall also consecrate them, that they may be most holy; whatever touches them shall be holy. 30 You shall anoint Aaron and his sons, and consecrate them, that they may minister as priests to Me.
...And so, they’ve been warned.
Adhering carefully to God’s holiness was critical to serving in the presence of the Lord while avoiding one's own destruction. Holiness is maintained by obeying God’s instructions including those pertaining to the tent, and only things already designated as holy shall touch the tent or anything in it.
Nadab and Abihu ignored God’s warnings and violated what God had previously instructed and failed to regard God as holy by offering that which was not authorized as holy and fit for service unto Him. In doing so, they brought their own destruction upon themselves... as they have been warned.