Daniel resolved not to defile himself with the king’s food and wine and asked permission not to take them. He proposed a short test with vegetables and water to compare results. Daniel 1:8
In Daniel 1:8–10, Daniel decides inwardly not to make himself unclean by eating the king’s special food or drinking the king’s wine. Instead of refusing loudly, he asks the chief official over the court trainees for permission to avoid it. The story then explains that God causes this official to treat Daniel with kindness and concern. Daniel 1 opens the book by placing Daniel and other Judean youths inside the Babylonian royal training program, where they are given new names, education, and rations from the king. Verses 8–10 zoom in on one pressure point of that program: the daily food and drink supplied by the palace.
Daniel’s first recorded act in Babylon is an inner decision: he will not make himself “unclean” by the king’s special food and wine (verse 8). The text presents this as a boundary Daniel believes matters before God, not merely a personal preference. Just as clearly, Daniel does not stage a public refusal.
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with Daniel 1:8, then read the surrounding section so the answer stays connected to the passage's flow.
8But Daniel purposed in his heart that he would not defile himself with the king`s dainties, nor with the wine which he drank: therefore he requested of the prince of the eunuchs that he might not defile himself.