Daniel has been appointed a commissioner to watch over the satraps and wise men. The king was ready to appoint Daniel even higher, but the perfects, wise men, and others tried to get Daniel Killed.
Daniel was eventually thrown into the Lion's Den, because of an injunction the King was tricked into signing, because there was a law of the Medes and Persians, that once a law was enacted, it couldn't be changed.
The God of Heaven closed the mouth of the lions, so Daniel wasn't injuried because he trust God and he hadn't done anything wrong.
In the end, the evil men were thrown into the Lion's Den, with their family member.