Barack Obama has never been a military officer. Notoriously, the U.S. Armed Services are subject to civilian control. The Commmander in Chief is their civilian controller. He is not a member of the uniformed armed services.
The President, who serves as the civilian Commander-in-Chief is not subject to the Uniform Code of Military Justice (UCMJ) or trial by court-martial.
Barack Obama, as an American civilian, is not subject to trial by military tribunal.
Ex parte Milligan, 71 U.S. 4 Wall. 2 (1866) 9-0.
Time has proven the discernment of our ancestors, for even these provisions, expressed in such plain English words that it would seem the ingenuity of man could not evade them, are now, after the lapse of more than seventy years, sought to be avoided. Those great and good men foresaw that troublous times would arise when rulers and people would become restive under restraint, and seek by sharp and decisive measures to accomplish ends deemed just and proper, and that the principles of constitutional liberty would be in peril unless established by irrepealable law. The history of the world had taught them that what was done in the past might be attempted in the future. The Constitution of the United States is a law for rulers and people, equally in war and in peace, and covers with the shield of its protection all classes of men, at all times71 U. S. 121
and under all circumstances. No doctrine involving more pernicious consequences was ever invented by the wit of man than that any of its provisions can be suspended during any of the great exigencies of government. Such a doctrine leads directly to anarchy or despotism, but the theory of necessity on which it is based is false, for the government, within the Constitution, has all the powers granted to it which are necessary to preserve its existence, as has been happily proved by the result of the great effort to throw off its just authority.
[...]
But it is said that the jurisdiction is complete under the "laws and usages of war."
It can serve no useful purpose to inquire what those laws and usages are, whence they originated, where found, and on whom they operate; they can never be applied to citizens in states which have upheld the authority of the government, and where the courts are open and their process unobstructed. This court has judicial knowledge that, in Indiana, the Federal authority was always unopposed, and its courts always open to hear criminal accusations and redress grievances, and no usage of war could sanction a military trial there for any offence whatever of a citizen in civil life in nowise
71 U. S. 122
connected with the military service. Congress could grant no such power, and, to the honor of our national legislature be it said, it has never been provoked by the state of the country even to attempt its exercise. One of the plainest constitutional provisions was therefore infringed when Milligan was tried by a court not ordained and established by Congress and not composed of judges appointed during good behavior.
Why was he not delivered to the Circuit Court of Indiana to be proceeded against according to law? No reason of necessity could be urged against it, because Congress had declared penalties against the offences charged, provided for their punishment, and directed that court to hear and determine them. And soon after this military tribunal was ended, the Circuit Court met, peacefully transacted its business, and adjourned. It needed no bayonets to protect it, and required no military aid to execute its judgments. It was held in a state, eminently distinguished for patriotism, by judges commissioned during the Rebellion, who were provided with juries, upright, intelligent, and selected by a marshal appointed by the President. The government had no right to conclude that Milligan, if guilty, would not receive in that court merited punishment, for its records disclose that it was constantly engaged in the trial of similar offences, and was never interrupted in its administration of criminal justice. If it was dangerous, in the distracted condition of affairs, to leave Milligan unrestrained of his liberty because he "conspired against the government, afforded aid and comfort to rebels, and incited the people to insurrection," the law said arrest him, confine him closely, render him powerless to do further mischief, and then present his case to the grand jury of the district, with proofs of his guilt, and, if indicted, try him according to the course of the common law. If this had been done, the Constitution would have been vindicated, the law of 1863 enforced, and the securities for personal liberty preserved and defended.
[...]
It is claimed that martial law covers with its broad mantle the proceedings of this military commission. The proposition is this: that, in a time of war, the commander of an armed force (if, in his opinion, the exigencies of the country demand it, and of which he is to judge) has the power, within the lines of his military district, to suspend all civil rights and their remedies and subject citizens, as well as soldiers to the rule of his will, and, in the exercise of his lawful authority, cannot be restrained except by his superior officer or the President of the United States.
If this position is sound to the extent claimed, then, when war exists, foreign or domestic, and the country is subdivided into military departments for mere convenience, the commander of one of them can, if he chooses, within his limits, on the plea of necessity, with the approval of the Executive, substitute military force for and to the exclusion of the laws, and punish all persons as he thinks right and proper, without fixed or certain rules.
The statement of this proposition shows its importance, for, if true, republican government is a failure, and there is an end of liberty regulated by law. Martial law established on such a basis destroys every guarantee of the Constitution, and effectually renders the "military independent of and superior to the civil power" -- the attempt to do which by the King of Great Britain was deemed by our fathers such an offence that they assigned it to the world as one of the causes which impelled them to declare their independence. Civil liberty and this kind of martial law cannot endure
71 U. S. 125
together; the antagonism is irreconcilable, and, in the conflict, one or the other must perish.
[...]
The jurisdiction claimed is much more extensive. The necessities of the service during the late Rebellion required that the loyal states should be placed within the limits of certain military districts and commanders appointed in them, and it is urged that this, in a military sense, constituted them the theater of military operations, and as, in this case, Indiana had been and was again threatened with invasion by the enemy, the occasion was furnished to establish martial law. The conclusion does not follow from the premises. If armies were collected in Indiana, they were to be employed in another locality, where the laws were obstructed and the national authority disputed. On her soil there was no hostile foot; if once invaded, that invasion was at an end, and, with
71 U. S. 127
it, all pretext for martial law. Martial law cannot arise from a threatened invasion. The necessity must be actual and present, the invasion real, such as effectually closes the courts and deposes the civil administration.
It is difficult to see how the safety for the country required martial law in Indiana. If any of her citizens were plotting treason, the power of arrest could secure them until the government was prepared for their trial, when the courts were open and ready to try them. It was as easy to protect witnesses before a civil as a military tribunal, and as there could be no wish to convict except on sufficient legal evidence, surely an ordained and establish court was better able to judge of this than a military tribunal composed of gentlemen not trained to the profession of the law.
It follows from what has been said on this subject that there are occasions when martial rule can be properly applied. If, in foreign invasion or civil war, the courts are actually closed, and it is impossible to administer criminal justice according to law, then, on the theatre of active military operations, where war really prevails, there is a necessity to furnish a substitute for the civil authority, thus overthrown, to preserve the safety of the army and society, and as no power is left but the military, it is allowed to govern by martial rule until the laws can have their free course. As necessity creates the rule, so it limits its duration, for, if this government is continued after the courts are reinstated, it is a gross usurpation of power. Martial rule can never exist where the courts are open and in the proper and unobstructed exercise of their jurisdiction. It is also confined to the locality of actual war. Because, during the late Rebellion, it could have been enforced in Virginia, where the national authority was overturned and the courts driven out, it does not follow that it should obtain in Indiana, where that authority was never disputed and justice was always administered.
[...]
The two remaining questions in this case must be answered in the affirmative. The suspension of the privilege of the
71 U. S. 131
writ of habeas corpus does not suspend the writ itself. The writ issues as a matter of course, and, on the return made to it, the court decides whether the party applying is denied the right of proceeding any further with it.
If the military trial of Milligan was contrary to law, then he was entitled, on the facts stated in his petition, to be discharged from custody by the terms of the act of Congress of March 3d, 1863. The provisions of this law having been considered in a previous part of this opinion, we will not restate the views there presented. Milligan avers he was a citizen of Indiana, not in the military or naval service, and was detained in close confinement, by order of the President, from the 5th day of October, 1864, until the 2d day of January, 1865, when the Circuit Court for the District of Indiana, with a grand jury, convened in session at Indianapolis, and afterwards, on the 27th day of the same month, adjourned without finding an indictment or presentment against him. If these averments were true (and their truth is conceded for the purposes of this case), the court was required to liberate him on taking certain oaths prescribed by the law, and entering into recognizance for his good behavior.
But it is insisted that Milligan was a prisoner of war, and therefore excluded from the privileges of the statute. It is not easy to see how he can be treated as a prisoner of war when he lived in Indiana for the past twenty years, was arrested there, and had not been, during the late troubles, a resident of any of the states in rebellion. If in Indiana he conspired with bad men to assist the enemy, he is punishable for it in the courts of Indiana; but, when tried for the offence, he cannot plead the rights of war, for he was not engaged in legal acts of hostility against the government, and only such persons, when captured, are prisoners of war. If he cannot enjoy the immunities attaching to the character of a prisoner of war, how can he be subject to their pains and penalties?
[...]
- - - - - - - - -
https://www.govinfo.gov/content/pkg/STATUTE-123/pdf/STATUTE-123-Pg2190.pdf#page=385
123 STAT. 2574
123 Stat. 2575
‘‘§ 948b. Military commissions generally‘‘(a) PURPOSE.—This chapter establishes procedures governing the use of military commissions to try alien unprivileged enemy belligerents for violations of the law of war and other offenses triable by military commission.
123 STAT. 2576
‘‘§ 948d. Jurisdiction of military commissions‘‘A military commission under this chapter shall have jurisdiction to try persons subject to this chapter for any offense made punishable by this chapter, sections 904 and 906 of this title (articles 104 and 106 of the Uniform Code of Military Justice), or the law of war, whether such offense was committed before, on, or after September 11, 2001, and may, under such limitations as the President may prescribe, adjudge any punishment not forbidden by this chapter, including the penalty of death when specifically authorized under this chapter. A military commission is a competent tribunal to make a finding sufficient for jurisdiction.
https://ucmj.us/904-article-104-aiding-the-enemy/
UCMJ Article 104
904. ARTICLE 104. Aiding the EnemyAny person who–
(1) aids, or attempts to aid, the enemy with arms, ammunition, supplies, money, or other things; or (2) without proper authority, knowingly harbors or [protects or gives intelligence to or communicates or corresponds with or holds any intercourse with the enemy, either directly or indirectly; shall suffer death or such other punishment as a court-martial or military commission may direct.
https://ucmj.us/906-article-106-spies/
UCMJ Article 106
906. ARTICLE 106. SpiesAny person who in time of war is found lurking as a spy or acting as a spy in or about any place, vessel, or aircraft, within the control or jurisdiction of any of the armed forces, or in or about any shipyard, any manufacturing or industrial plant, or any other place or institution engaged in work in aid of the prosecution of the war by the Unites States, or elsewhere, shall be tried by a general court-martial or by a military commission and on conviction shall be punished by death.