Upon realizing he had fallen victim to a calculated plot aimed at destroying Daniel, the king was overcome with profound sadness. He loved and believed in Daniel, making the thought of his impending execution entirely unbearable [רש״י, יוסף אבן יחיא, ביאור שטיינזלץ]. Driven by this deep distress, the king immediately launched a frantic effort to prevent the carrying out of the very decree he had just authorized.
He dedicated his entire heart and mind to the singular goal of rescuing his loyal servant [אבן עזרא, חומת אנך, ביאור שטיינזלץ]. This intense focus manifested in several different strategies. Initially, the king searched for legal loopholes to invalidate the accusations. He outright told his ministers that he did not believe their claims [רש״י]. Furthermore, he argued that the royal decree did not even apply to Daniel's actions; since Daniel was merely fulfilling a constant, mandatory religious obligation rather than making a new personal request from God, it could not be considered a violation of the king's order [מצודת דוד, מצודת ציון, מלבי״ם]. When legal arguments met resistance, the king even offered to pay a financial ransom out of his own personal wealth to buy back Daniel's life [מצודת דוד, מצודת ציון, חומת אנך].
The king's rescue attempts evolved as the reality of the situation set in. At first, he sought to cancel the decree entirely and clear Daniel of any punishment, arguing that Daniel held a unique spiritual and national status. However, the laws of Media and Persia were absolute and could not be revoked or altered under any circumstances. Recognizing this unyielding legal wall, the king was forced to change his tactics and pursue the lesser of two evils. He began to plead with his officials, attempting to at least delay the execution or commute the death sentence to a lighter, less fatal form of suffering [אלשיך].
These massive, desperate efforts to find any possible excuse continued relentlessly until the sun began to set [אבן עזרא, מצודת ציון]. The arrival of evening, however, brought an abrupt end to the king's defense. Sunset marked the designated time for prayer. When Daniel once again knelt and prayed openly to God, his public display of devotion stripped away the king's final legal defenses, leaving him without any remaining excuse to protect his beloved advisor [רש״י].