The only people who would have seen what happened to the king were either the king’s guards or Amalickiah’s people. The guards knew that Amalickiah’s people had killed the king, and also knew that they were standing not far from a very large army. Being only an honor guard, they were outnumbered, and fled.
Whether or not they had fled, Amalickiah’s army would have been ready to either blame them or kill them, whichever served them best. In this case, the guards fled, and Amalickiah takes advantage of that flight to use it to declare their guilt in killing the king. Therefore, Amalickiah arranged for the king’s murder, but also managed to be seen as a hero in the aftermath.