Daniel heard the Word of God in his heart. Sometimes, God spoke to men of God in an audible voice, dreams or visions. But we read of no such experience here. “Daniel purposed in his heart not to defile himself” (Dan. 1:8). His response was clear.
He knew the Old Testament law: “Make a difference between the unclean and the clean, and between the beast that may be eaten and the beast that may not be eaten.” The king's meat was unclean to the Jew. God called them “a peculiar people” (Lev. 11:44; Deut. 14:2).
God also calls those who follow Him today “a peculiar people” (1 Pet. 2:9). He calls us to separate ourselves from the world and live clean and pure lives (2 Cor. 6:14-7:1).
The king named Daniel Belteshazzar, prince of Bel the chief Babylonian god. But Daniel refused to forget his God as Satan in this fashion tempted him to do. He refused to defile himself with the king's meat nor with his gods.
Daniel also knew the king had dedicated this meat unto false gods. He had to break the first two commandments to obey the king's orders. Daniel said in his heart, “I'll obey God, not man. I'll not serve Satan by bowing down to false gods.”
When we covet after money, fame, illicit sex, or any other thing, we not only break the tenth commandment, but we break the first two as well. “Covetousness...is idolatry” (Col. 3:5).
James says when we break one commandment, we break them all (Jas. 2:10).
Daniel prayed for wisdom. He answered the king's messenger with tact and diplomacy. “Prove us ten days, see how we do, and then deal with us as you see fit.” God honored this test and gave Daniel favor with the king.
It pleases God when we ask for wisdom, trust God and use tact and diplomacy without compromise as Daniel did. God will guide us through His Word and the Holy Spirit. He uses circumstances, too, but we cannot rely on circumstances alone for guidance. The Lord speaks to our hearts and will never go against His Word.