After Haman's decree, Mordechai sent Hasach with a message to Esther. The gemara (Megila 15a) says that Hasach was really Daniel and was called Hasach because he was cut from power. Why suddenly now, right after Haman's gezeira, was Daniel demoted?
The Me'or SheBiMegila brings from the Meshech Chochma answers that Daniel's greatness was that he was Moseir Nefesh to daven three times a day, even though it is only a Mitzva D'Rabbanan. He was willing to be eaten by lions to safeguard this principle. This made him legendary. However now after the gezeira of Haman, the entire nation rose to the call of Mordechai and accepted a fast of three straight, while davening, learning torah, and doing tshuvah. With Mesiras Nefesh like that suddenly Daniel's Mesiras Nefesh no longer reached mythical proportions.
Daniel wasn't actually demoted, but rather due to the unbelievable heights reached by every ordinary Yehudi during this time, his legendary greatness was cut down a few notches.