Miley is currently, and was during the previous administration, Chairman of The Joint Chiefs of Staff. In military terms there is no “chain of command” above his authority – except the President himself.
Trump’s state of mind and his conduct during the last two months of his term were chaotic and deeply concerning to everyone around him – from top level White House staff, to Attorney General William Barr, to FBI Director Christopher Wray, to Defense Secretary Mark Esper. Each of them communicated to congressional contacts in both parties (and off the record to reporters) that they believed Trump’s obsession with holding onto power following the November elections could lead to violations of law – or actions that would damage national security and US interests abroad. The President was increasingly seen as unstable, and a potential threat to the government itself.
That’s how bad it really was. And none of the Constitutional safeguards intended to protect the country against a corrupt or incompetent President worked. The full extent of the damage and the danger is only beginning to come out :
https://www.theatlantic.com/politics/archive/2021/06/william-barrs-trump-administration-attorney-general/619298/
https://www.nytimes.com/2020/09/24/us/politics/fbi-director-voter-fraud.html
https://www.newyorker.com/news/letter-from-bidens-washington/youre-gonna-have-a-fucking-war-mark-milleys-fight-to-stop-trump-from-striking-iran
https://www.mediaite.com/news/officials-say-defense-secretary-mark-esper-took-lead-on-gen-milleys-calls-to-china/
As Hawaii_Jake has rightly pointed out, all members of the military, senior officers and enlisted personnel, swear an oath to the Constitution – not to the President or any other authority. So, what exactly should a decorated veteran officer in charge of the entire US defense establishment do when he realizes a fucking lying, draft doging, meglomaniac, con man, nutcase is trying to misuse the military as a tool to prop up his own rotten regime?? Ask the damn political hacks in Congress who’ve been empowering this scheme if they would mind, please, whenever they’re in the mood, and if it’s okay with their cult leader, to just sort of…slow down a little??!
Thank god for General Mark Miley. And goddamn all stinking political whores who say what he did was treason.