The Israelites, including Daniel and his friends, had been taken captive by the Babylonians. Because Daniel and his friends were young and smart enough - they had been taken aside and trained to serve in king Nebuchadnezzar's court. It was about a year later that King Nebuchadnezzar had a dream, and demanded that his men interpret the dream or they would all be put to death. When Daniel heard about this and that no one could interpret it, he and his friends spent time in prayer before asking to see the king.
(Daniel 2:27-30) Daniel answered before the king and said, “As for the mystery about which the king has inquired, neither wise men, conjurers, magicians nor diviners are able to declare it to the king. 28 However, there is a God in heaven who reveals mysteries, and He has made known to King Nebuchadnezzar what will take place in the latter days. This was your dream and the visions in your mind while on your bed. 29 As for you, O king, while on your bed your thoughts turned to what would take place in the future; and He who reveals mysteries has made known to you what will take place. 30 But as for me, this mystery has not been revealed to me for any wisdom residing in me more than in any other living man, but for the purpose of making the interpretation known to the king, and that you may understand the thoughts of your mind.
Daniel wanted to make sure that he gave God all the credit before describing the dream...
(Daniel 2:31-35) “You, O king, were looking and behold, there was a single great statue; that statue, which was large and of extraordinary splendor, was standing in front of you, and its appearance was awesome. 32 The head of that statue was made of fine gold, its breast and its arms of silver, its belly and its thighs of bronze, 33 its legs of iron, its feet partly of iron and partly of clay. 34 You continued looking until a stone was cut out without hands, and it struck the statue on its feet of iron and clay and crushed them. 35 Then the iron, the clay, the bronze, the silver and the gold were crushed all at the same time and became like chaff from the summer threshing floors; and the wind carried them away so that not a trace of them was found. But the stone that struck the statue became a great mountain and filled the whole earth"...
Remember the verses that describe Jesus as the corner stone? (see ie. Ephesians 2:19-22) The "stone" is prophesying about Jesus who is the King of kings and will one day reign over the earth in the Millennium. Although when Daniel interpreted the dream, God didn't go into all the details that this King (this stone) would be Israel's Messiah, God gave enough information to king Nebucadnezzar, which again gave all the credit and glory to God...
(Daniel 2:36-45) “This was the dream; now we will tell its interpretation before the king. 37 You, O king, are the king of kings, to whom the God of heaven has given the kingdom, the power, the strength and the glory; 38 and wherever the sons of men dwell, or the beasts of the field, or the birds of the sky, He has given them into your hand and has caused you to rule over them all. You are the head of gold. 39 After you there will arise another kingdom inferior to you, then another third kingdom of bronze, which will rule over all the earth. 40 Then there will be a fourth kingdom as strong as iron; inasmuch as iron crushes and shatters all things, so, like iron that breaks in pieces, it will crush and break all these in pieces. 41 In that you saw the feet and toes, partly of potter’s clay and partly of iron, it will be a divided kingdom; but it will have in it the toughness of iron, inasmuch as you saw the iron mixed with common clay. 42 As the toes of the feet were partly of iron and partly of pottery, so some of the kingdom will be strong and part of it will be brittle. 43 And in that you saw the iron mixed with common clay, they will combine with one another in the seed of men; but they will not adhere to one another, even as iron does not combine with pottery.
44" In the days of those kings the God of heaven will set up a kingdom which will never be destroyed, and that kingdom will not be left for another people; it will crush and put an end to all these kingdoms, but it will itself endure forever. 45 Inasmuch as you saw that a stone was cut out of the mountain without hands and that it crushed the iron, the bronze, the clay, the silver and the gold, the great God has made known to the king what will take place in the future; so the dream is true and its interpretation is trustworthy.”
King Nebuchadnezzar gave homage to Daniel and acknowledged God, but Nebuchadnezzar was still not a believer. A little while later, King Nebuchadnezzar made a huge idol for everyone to worship. When Daniel's three friends refused to bow down to it, he had them thrown into the furnace. But - not only did they not burn up, Nebuchadnezzar commented on what he saw...
(Daniel 3:25) He said, “Look! I see four men loosed and walking about in the midst of the fire without harm, and the appearance of the fourth is like a son of the gods!”
This could have been a preincarnate appearance of Christ (Jesus) or maybe just an angel, but still, Nebuchadnezzar acknowledged God again - but again - without believing in Him. Eventually Nebuchadnezzar had another dream, which Daniel interpreted. Nebuchadnezzar was going to go mad for about 7 years (living like an animal) UNTIL he would recognize and humble himself to the one true God...
(Daniel 4:26-27) 'And in that it was commanded to leave the stump with the roots of the tree, your kingdom will be assured to you after you recognize that it is Heaven that rules. 27 Therefore, O king, may my advice be pleasing to you: break away now from your sins by doing righteousness and from your iniquities by showing mercy to the poor, in case there may be a prolonging of your prosperity.’
Daniel did give advice to the king to change in order to avoid the consequences, but instead, Nebuchadnezzar exalted himself. And just as the dream prophesied, he went mad - with an illness known now as"boanthropy" - where people imagine themselves to be an animal and act accordingly. At the end of the seven years,..
(Daniel 4:34-37) “But at the end of that period, I, Nebuchadnezzar, raised my eyes toward heaven and my reason returned to me, and I blessed the Most High and praised and honored Him who lives forever;
For His dominion is an everlasting dominion,
And His kingdom endures from generation to generation.
35 “All the inhabitants of the earth are accounted as nothing,
But He does according to His will in the host of heaven
And among the inhabitants of earth;
And no one can ward off His hand
Or say to Him, ‘What have You done?’
36 At that time my reason returned to me. And my majesty and splendor were restored to me for the glory of my kingdom, and my counselors and my nobles began seeking me out; so I was reestablished in my sovereignty, and surpassing greatness was added to me. 37 Now I, Nebuchadnezzar, praise, exalt and honor the King of heaven, for all His works are true and His ways just, and He is able to humble those who walk in pride.”
We cannot judge hearts, but this sure seems like king Nebuchadnezzar become a believer at this point! And nothing more is written of him, except when Daniel is warning his son, Belshazzar, about being prideful - Daniel tells him about his father...
(Daniel 5:18-21) "...O king, the Most High God granted sovereignty, grandeur, glory and majesty to Nebuchadnezzar your father. 19 Because of the grandeur which He bestowed on him, all the peoples, nations and men of every language feared and trembled before him; whomever he wished he killed and whomever he wished he spared alive; and whomever he wished he elevated and whomever he wished he humbled. 20 But when his heart was lifted up and his spirit became so proud that he behaved arrogantly, he was deposed from his royal throne and his glory was taken away from him. 21 He was also driven away from mankind, and his heart was made like that of beasts, and his dwelling place was with the wild donkeys. He was given grass to eat like cattle, and his body was drenched with the dew of heaven until he recognized that the Most High God is ruler over the realm of mankind and that He sets over it whomever He wishes..."
This is what humility is in order to become a believer...
(Ephesians 2:8-9) For by grace you have been saved through faith; and that not of yourselves, it is the gift of God; 9 not as a result of works, so that no one may boast.