This sure reminds me of something, of the very sorry end of our first king, Saul. He had been commanded by G-d to destroy Amalek, every one and all their cattle, but he didn't. He "improved" the commandment according to his agenda, his morals.
Remember, at the same time, instead of investing all of his military strength to defeat the Philistines (Amalek,) he persecuted David. He knew that David had already been annointed to succede him, and he declared David the enemy of the people.
In the end, since he didn't do what G-d commanded, because he wanted to be "moral," he was deposed in one of the most pathetic scenes in the Bible.
Meanwhile, the Prophet Samuel tells Saul:
"I shall not return to you for you have rejected the word of the Lord and the Lord has rejected you from being King over Israel."
And Samuel turned to go and he [Saul] seized the hem of his robe and it tore. And Samuel said to him, "The Lord has torn the kingdom of Israel from you today and has given it your fellow who is better than you.'" (1 Samuel 15:26-28)