Related Rule
United States of America
Practice Relating to Rule 101. The Principle of Legality
The US Field Manual (1956) reproduces Article 99 of the 1949 Geneva Convention III. 
United States, Field Manual 27-10, The Law of Land Warfare, US Department of the Army, 18 July 1956, as modified by Change No. 1, 15 July 1976, § 175.
With respect to situations of occupation, the manual uses the same wording as Article 65 of the 1949 Geneva Convention IV. 
United States, Field Manual 27-10, The Law of Land Warfare, US Department of the Army, 18 July 1956, as modified by Change No. 1, 15 July 1976, § 435.
The US Air Force Pamphlet (1976) provides that no prisoner of war “may be tried or sentenced for an act which is not forbidden by the law of the detaining power or by international law in force at the time the act was committed”. 
United States, Air Force Pamphlet 110-31, International Law – The Conduct of Armed Conflict and Air Operations, US Department of the Air Force, 1976, § 13-8.
The Agent Orange case in 2005 involved a class action suit filed on behalf of various Vietnamese nationals and an organization, The Vietnamese Association for Victims of Agent Orange/Dioxin, against Dow Chemical and other US chemical manufacturers, for harms allegedly done to them and their land through the United States’ use of Agent Orange and other herbicides during the Vietnam War from 1965 to 1971 and by the South Vietnamese government’s subsequent use of such herbicides until 1975. In dismissing the claims, the Court found that, while recognizing the evolution of international law since 1975, the use of herbicides did not violate, at the time they were used, either customary or conventional international law binding on the United States. With regard to ex post facto liability the Court stated:
A party is not bound by a treaty prior to the date such a treaty enters into force for it; treaties are not retroactive. Vienna Convention on the Law of Treaties, May 23, 1969, art. 28, 1155 U.N.T.S. 331, 339 (entered into force Jan. 27, 1980) (“Unless a different intention appears from the treaty or is otherwise established, its provisions do not bind a party in relation to any act or fact which took place or any situation which ceased to exist before the date of the entry into force of the treaty with respect to that party.”); see also J. Mervyn Jones, The Retroactive Effect of the Ratification of Treaties, 29 AM. J. INT’L L. 51 (1935). The Vienna Convention on the Law of Treaties, albeit not ratified by the United States to date, is regarded as largely declaratory of existing law and has been recognized as such by the United States Department of State. LORI FISLER DAMROSCH, LOUIS HENKIN, RICHARD CRAWFORD PUGH, OSCAR SCHACHTER & HANS SMIT, INTERNATIONAL LAW CASES AND MATERIALS 452-54 (4th ed. 2001); see also DAVID J. BEDERMAN ET AL., INTERNATIONAL LAW: A HANDBOOK FOR JUDGES 18 (Am. Soc’y of Int’l Law 2003) (“[E]ven though the United States is not a party [to the Vienna Convention on the Law of Treaties], it regards almost all of the [Convention]’s provisions as binding customary international law.”). As Professor Anderson opined [Decl. of Kenneth Howard Anderson, Jr., Nov. 2, 2004]:
International law as a general proposition does not permit retroactive application … International law could hardly develop if states believed that by accepting newly developed norms of international law, the result would be to hold them liable under today’s norms for behavior acceptable under yesterday’s. This consideration has particular importance for the international law of war – a body of law in which all acts for which individuals might be held liable are criminal … a body of law in which the acts at issue are ones involving great death, destruction and violence. States, in the interests of protecting their soldiers, would not agree to new and more restrictive rules, including criminal liability, if they believed that it would subject them and their military personnel to ex post facto liability.
Anderson Decl. ¶ 35 (footnote moved to text). 
United States, Eastern States District Court (EDNY), Agent Orange case, Judgment, 28 March 2005, pp. 129–130.
The Hamdan case in 2006 involved a Yemeni national in custody at the US naval base in Guantanamo Bay, Cuba, who petitioned for writs of habeas corpus and mandamus to challenge the Executive’s intended means of prosecuting a charge of conspiracy to commit offences triable by a military commission. In a majority opinion, the US Supreme Court found that the military commissions convened to try Hamdan violated in structure and procedure both the Uniform Code of Military Justice (UCMJ) and the 1949 Geneva Conventions. With regard to whether the crime of “conspiracy” is a recognized violation of the laws of war, Justice Stevens, joined by Justices Souter, Ginsberg and Breyer, held that:
[N]one of the major treaties governing the law of war identifies conspiracy as a violation thereof. And the only “conspiracy” crimes that have been recognized by international war crimes tribunals (whose jurisdiction often extends beyond war crimes proper to crimes against humanity and crimes against the peace) are conspiracy to commit genocide and common plan to wage aggressive war, which is a crime against the peace and requires for its commission actual participation in a “concrete plan to wage war.” 1 Trial of the Major War Criminals Before the International Military Tribunal: Nuremberg, 14 November 1945-1 October 1946, p 225 (1947). The International Military Tribunal at Nuremberg, over the prosecution’s objections, pointedly refused to recognize as a violation of the law of war conspiracy to commit war crimes, see, e.g., 22 id., at 469, and convicted only Hitler’s most senior associates of conspiracy to wage aggressive war, see S. Pomorski, Conspiracy and Criminal Organization, in the Nuremberg Trial and International Law 213, 233–235 (G. Ginsburgs & V. Kudriavtsev eds. 1990). As one prominent figure from the Nuremberg trials has explained, members of the Tribunal objected to recognition of conspiracy as a violation of the law of war on the ground that “[t]he Anglo-American concept of conspiracy was not part of European legal systems and arguably not an element of the internationally recognized laws of war.” T. Taylor, Anatomy of the Nuremberg Trials: A Personal Memoir 36 (1992); see also id., at 550 (observing that Francis Biddle, who as Attorney General prosecuted the defendants in Quirin, thought the French judge had made a “‘persuasive argument that conspiracy in the truest sense is not known to international law’”). 
United States, Supreme Court, Hamdan case, Judgment, Part V, 29 June 2006.
In 2008, in the Khadr case, a Guantánamo Military Commission considered a Defence motion to dismiss Charge One for failure to state an offence and for lack of subject matter jurisdiction. In denying the Defence motion, the Commission firstly noted Charge One and its Specification:
Specification: In that Omar Ahmed Khadr, a person subject to trial by military commission as an alien unlawful enemy combatant, did, in Afghanistan, on or about July 27, 2002, while in the context of and associated with armed conflict and without enjoying combatant immunity, unlawfully and intentionally murder U.S. Army Sergeant First Class Christopher Speer, in violation of the law of war, by throwing a hand grenade at U.S. forces resulting in the death of Sergeant First Class Speer. 
United States, Guantánamo Military Commission, Khadr case, Ruling, 21 April 2008, § 2.
The Commission then stated the following regarding the ex post facto aspects of the Defence motion:
8. The defense asserts that the specific statutory provision in question, 10 U.S.C. Sec. 950v(b)(15), did not exist at the time of the offenses charged. Since the offenses charged allegedly occurred in 2002 and the statute in question was enacted in 2006, that assertion is beyond dispute. Assuming for the purposes of this paragraph of this motion that Mr. Khadr is entitled to specific, partial or limited protections of the Constitution, the commission will evaluate the provision in light of Ex Post Facto standards:
a. On its face, the provision applies to Mr. Khadr. The jurisdictional provisions of the MCA [Military Commissions Act 2006] (Section 948d) set forth that any person who may be tried by a military commission may be tried for any offense listed in the MCA – whether committed before, on, or after 11 September 2001.
b. The Supreme Court has recognized Congress’ authority in this area (See, eg., Ex Parte Quirin, 317 U.S. 1, 63 S.Ct. 2 (1942). It has stated that “An important incident to the conduct of war is the adoption of measures by the military command not only to repel and defeat the enemy, but to seize and subject to disciplinary measures those enemies who in their attempt to thwart or impede our military effort have violated the law of war.” Ex Parte Quirin, Id., at 10.
c. The Congressional decision to enact the murder in violation of the law of war provision was not a decision to create a new crime and Congress did not create a new crime. The Supreme Court recognized that Congress has and has had the choice of allowing military commissions to determine for themselves what are violations of the law of war or of setting out specifically certain violations of the law of war. “Congress had the choice of crystallizing in permanent form and in minute detail every offense against the law of war, or of adopting the system of common law applied by military tribunals so far as it should be recognized and deemed applicable by the courts … .” Ex Parte Quirin, Id., at 12.
d. The commission concludes that prosecution of Mr. Khadr for the offense of murder in violation of the law of war, as defined by the provision in question, does not violate ex post facto standards – whether under the Constitution or international law. 
United States, Guantánamo Military Commission, Khadr case, Ruling, 21 April 2008, § 8.
According to the Report on US Practice, “Articles 4, 5 and 6 [of the 1977 Additional Protocol II] reflect general US policy on treatment of persons in the power of an adverse party in armed conflicts governed by common Article 3” of the 1949 Geneva Conventions. The report also notes: “It is the opinio juris of the US that persons detained in connection with an internal armed conflict are entitled to humane treatment as specified in Articles 4, 5 and 6 [of the 1977 Additional Protocol II].” According to the report, it is also the opinio juris of the United States that military necessity will not justify derogation of the right not to be subjected to retroactive penal legislation. 
Report on US Practice, 1997, Chapter 5.3 and 5.7.