Dan 1:1-21

DANIEL AND THREE FRIENDS
Here, we meet Daniel and King Nebuchadnezzar, the King of Babylon. In Ezek 14:14, God called Daniel one of the three righteous men of history, along with Noah, and Job. In verse 17 of the first Chapter, we find out that God gave Daniel understanding in visions and dreams.
1 In the third year of the reign of Jehoiakim king of Judah came Nebuchadnezzar king of Babylon to Jerusalem, and besieged it. 
Dan 1:1
Nebuchadnezzar…besieged it – he was actually Nebuchadnezzar II, who reigned from 605 BC – 562 BC.
2 The Lord gave Jehoiakim king of Judah into his hand, with part of the vessels of the house of God; and he carried them into the land of Shinar to the house of his god: and he brought the vessels into the treasure-house of his god.
Dan 1:2
the Lord gave Jehoiahim king of Judah into his hand – this verse foreshadows Dan 7:25: “the saints shall be given into his hand.” God allowed Israel to be taken into captivity for 70 years as prophesied by Jeremiah. In Dan 9:5, Daniel confessed that Israel was captured because it departed from God’s precepts and judgments.
3 The king spoke to Ashpenaz the master of his eunuchs, that he should bring in [certain] of the children of Israel, even of the seed royal and of the nobles;4 youths in whom was no blemish, but well-favored, and skillful in all wisdom, and endowed with knowledge, and understanding science, and such as had ability to stand in the king’s palace; and that he should teach them the learning and the language of the Chaldeans.
Dan 1:4
young men in whom there was no blemish – Daniel was selected from the most outstanding of Israel.
5 The king appointed for them a daily portion of the king’s dainties, and of the wine which he drank, and that they should be nourished three years; that at the end of it they should stand before the king. 
Dan 1:5
three years of training – it appears the three year training was cut short after Daniel interpreted Nebuchadnezzar’s dream in the second year of his reign, see Dan 2:1. Daniel was then promoted to Prime Minister, see Dan 2:48.
6 Now among these were, of the children of Judah, Daniel, Hananiah, Mishael, and Azariah. 7 The prince of the eunuchs gave names to them: to Daniel he gave [the name of] Belteshazzar; and to Hananiah, [of] Shadrach; and to Mishael, [of] Meshach; and to Azariah, [of] Abed-nego. 
Dan 1:7
Belteshazzar, Shadrach, Abed-Nego – through this story, there are different Chaldean names given.
8 But 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. 9 Now God made Daniel to find kindness and compassion in the sight of the prince of the eunuchs. 
Dan 1:8
he would not defile himself – Daniel’s ability to hear from God came by his separation from the world. It appears he must have also become a eunuch.
10 The prince of the eunuchs said to Daniel, I fear my lord the king, who has appointed your food and your drink: for why should he see your faces worse looking than the youths who are of your own age? so would you endanger my head with the king. 11 Then said Daniel to the steward whom the prince of the eunuchs had appointed over Daniel, Hananiah, Mishael, and Azariah: 12 Prove your servants, I beg you, ten days; and let them give us pulse to eat, and water to drink. 13 Then let our faces be looked on before you, and the face of the youths who eat of the king’s dainties; and as you see, deal with your servants. 14 So he listened to them in this matter, and proved them ten days. 15 At the end of ten days their faces appeared fairer, and they were fatter in flesh, than all the youths who ate of the king’s dainties. 16 So the steward took away their dainties, and the wine that they should drink, and gave them pulse. 
Dan 1:15
their features appeared better – the blessing of holiness.
17 Now as for these four youths, God gave them knowledge and skill in all learning and wisdom: and Daniel had understanding in all visions and dreams.
Dan 1:17
Daniel had understanding in visions and dreams – which will be proven shortly.
18 At the end of the days which the king had appointed for bringing them in, the prince of the eunuchs brought them in before Nebuchadnezzar.19 The king talked with them; and among them all was found none like Daniel, Hananiah, Mishael, and Azariah: therefore stood they before the king. 20 In every matter of wisdom and understanding, concerning which the king inquired of them, he found them ten times better than all the magicians and enchanters who were in all his realm.
Dan 1:20
ten times better than the magicians – God gave them ability as mentioned in verse 17.
21 Daniel continued even to the first year of king Cyrus.
Dan 1:21
until the first year of King Cyrus – the Book of Daniel ends in Chapter 12 in the third year of Cyrus. Therefore, Daniel must have left his position after King Cyrus assumed more control. In Dan 6:28, we are told that Daniel prospered in the reign of Cyrus.