N Daniel 2, we read about Daniel's first assignment in his career of interpreting dreams and visions. Here in Daniel 4 we find another example. This time Nebuchadnezzar himself tells the story. However, it is important to note that the central figure in this narrative is neither Daniel, nor is it Nebuchadnezzar. The central figure is God Himself. And, the theme and lesson is the ugly nature of pride and the grandeur of humility.
Simply put, God revealed to Nebuchadnezzar in a dream that He was going to humble him with a seven-years-long-case of lycanthropy. In his dream, Nebuchadnezzar was compared to a great tree that was chopped down. He went from ruling the world to eating grass like a cow in a field. For seven years he lived in insanity and humiliation, until he had learned his lesson and was willing to give God the credit for his great kingdom.
One of the most important things to take notice of here is found in verse 27. There Daniel said to the king, "…break off your sins by righteousness, & your iniquities by showing mercy to the poor; if it may be a lengthening of your tranquility." This advice was given to the king after the dream had been dreamed & the interpretation had been explained. God gave Nebuchadnezzar the dream in order to give him a chance to avoid judgment. He didn't have to become an animal. The choice was his. It was a test that he failed though.