War crime
History: 

Early examples: In 1474, the first trial for a war crime was that of Peter von Hagenbach, realised by an ad hoc tribunal of the Holy Roman Empire, for his command responsibility for the actions of his soldiers, because "he, as a knight, was deemed to have a duty to prevent" criminal behaviour by a military force. Despite having argued that he had obeyed superior orders, von Hagenbach was convicted, condemned to death, and beheaded.

Hague Conventions: The Hague Conventions were international treaties negotiated at the First and Second Peace Conferences at The Hague, Netherlands, in 1899 and 1907, respectively, and were, along with the Geneva Conventions, among the first formal statements of the laws of war and war crimes in the nascent body of secular international law.

Lieber Code: The Lieber Code was written early in the American Civil War and President Abraham Lincoln issued as General Order 100 on April 24, 1863, just months after the military executions at Mankato, Minnesota.  General Order 100, Instructions for the Government of the Armies of the United States in the Field (Lieber Code) was written by Franz Lieber, a German lawyer, political philosopher, and veteran of the Napoleonic Wars. Lincoln made the Code military law for all wartime conduct of the Union Army. It defined command responsibility for war crimes and crimes against humanity as well as stated the military responsibilities of the Union soldier fighting the Confederate States of America.

Geneva Conventions: The Geneva Conventions are four related treaties adopted and continuously expanded from 1864 to 1949 that represent a legal basis and framework for the conduct of war under international law. Every single member state of the United Nations has currently ratified the conventions, which are universally accepted as customary international law, applicable to every situation of armed conflict in the world. The Additional Protocols to the Geneva Conventions adopted in 1977 containing the most pertinent, detailed and comprehensive protections of international humanitarian law for persons and objects in modern warfare are still not ratified by several states continuously engaged in armed conflicts, namely the United States, Israel, India, Pakistan, Iraq, Iran, and others. Accordingly, states retain different codes and values about wartime conduct. Some signatories have routinely violated the Geneva Conventions in a way that either uses the ambiguities of law or political maneuvering to sidestep the laws' formalities and principles.
The first three conventions have been revised and expanded, with the fourth one added in 1949:

The First Geneva Convention for the Amelioration of the Condition of the Wounded and Sick in Armed Forces in the Field was adopted in 1864 and then significantly revised and replaced by the 1906 version, the 1929 version, and later the First Geneva Convention of 1949.
The Second Geneva Convention for the Amelioration of the Condition of Wounded, Sick and Shipwrecked Members of Armed Forces at Sea was adopted in 1906 and then significantly revised and replaced by the Second Geneva Convention of 1949.
The Third Geneva Convention relative to the Treatment of Prisoners of War was adopted in 1929 and then significantly revised and replaced by the Third Geneva Convention of 1949.
The Fourth Geneva Convention relative to the Protection of Civilian Persons in Time of War was first adopted in 1949, based on parts of the 1907 Hague Convention IV.

Two Additional Protocols were adopted in 1977 with the third one added in 2005, completing and updating the Geneva Conventions:

Protocol I (1977) relating to the Protection of Victims of International Armed Conflicts.
Protocol II (1977) relating to the Protection of Victims of Non-International Armed Conflicts.
Protocol III (2005) relating to the Adoption of an Additional Distinctive Emblem.

Leipzig trials: Just after WWI, world governments started to try and systematically create a code for how war crimes would be defined. Their first outline of a law was "Instructions for the Government of Armies of the United States in the Field"—also known as the "Lieber Code." A small number of German military personnel of the First World War were tried in 1921 by the German Supreme Court for alleged war crimes.

London Charter/Nuremberg trials 1945: The modern concept of war crime was further developed under the auspices of the Nuremberg trials based on the definition in the London Charter that was published on August 8, 1945 (see Nuremberg principles). Along with war crimes the charter also defined crimes against peace and crimes against humanity, which are often committed during wars and in concert with war crimes.

International Military Tribunal for the Far East 1946: Also known as the Tokyo Trial, the Tokyo War Crimes Tribunal or simply as the Tribunal, it was convened on May 3, 1946, to try the leaders of the Empire of Japan for three types of crimes: "Class A" (crimes against peace), "Class B" (war crimes), and "Class C" (crimes against humanity), committed during World War II.

Formation of the International Criminal Court: On July 1, 2002, the International Criminal Court (ICC), a treaty-based court located in The Hague, came into being for the prosecution of war crimes committed on or after that date.  Several nations, most notably the United States, China, Russia, and Israel, have criticized the court. The United States still participates as an observer. Article 12 of the Rome Statute provides jurisdiction over the citizens of non-contracting states if they are accused of committing crimes in the territory of one of the state parties.
The ICC only has jurisdiction over these crimes when they are "part of a plan or policy or as part of a large-scale commission of such crimes".

Prominent indictees: 

Heads of state and government: To date, the present and former heads of state and heads of government that have been charged with war crimes include:

Russian President Vladimir Putin, for his contribution in the illegal abduction of children from Ukraine and deportation into Russia during the Russian invasion of Ukraine.
German Großadmiral and President Karl Dönitz and Japanese Prime Ministers and Generals Hideki Tōjō and Kuniaki Koiso in the aftermath of World War II.
Former Serbian President Slobodan Milošević was brought to trial charged with genocide, crimes against humanity, and war crimes in three republics. This pertained to superior responsibility for the Bosnia and Croatia indictments, and individual responsibility for the Kosovo indictment. He was acquitted as he died in custody in 2006, before the trial ended.
Former Liberian President Charles G. Taylor was also brought to The Hague charged with war crimes; his trial stretched from 2007 to March 2011. He was convicted in April 2012 of aiding and abetting crimes against humanity.
Former Bosnian Serb President Radovan Karadžić was arrested in Belgrade on July 18, 2008, and brought before Belgrade's War Crimes Court a few days later. He was extradited to the Netherlands, and is currently in The Hague, in the custody of the International Criminal Tribunal for the former Yugoslavia. The trial began in 2010. On March 24, 2016, he was found guilty of genocide in Srebrenica, war crimes and crimes against humanity, 10 of the 11 charges in total, and sentenced to 40 years' imprisonment. He was sentenced to life on appeal.
Omar al-Bashir, former head of state of Sudan, is charged with three counts of genocide, crimes against humanity and other war crimes regarding the war in the Darfur region of Sudan.
Former Libyan leader Muammar Gaddafi was indicted for allegedly ordering the killings of protesters and civilians and crimes against humanity, during the 2011 Libyan civil war, and was killed in October 2011 before he could stand trial.
Former Peruvian President Alberto Fujimori was charged with several counts of human rights violations committed by his government and affiliated death squads during his regime.

Other: Yoshijirō Umezu, general of the Imperial Japanese Army
Iwane Matsui, general of  the Imperial Japanese Army who was known for his involvement in the Nanjing Massacre
Seishirō Itagaki, War minister of the Empire of Japan
Hermann Göring, Commander in Chief of the Luftwaffe.
Ernst Kaltenbrunner and Adolf Eichmann, high-ranking members of the SS.
Wilhelm Keitel, Generalfeldmarschall, head of the Oberkommando der Wehrmacht.
Erich Raeder, Großadmiral, Commander in Chief of the Kriegsmarine.
Albert Speer, Minister of Armaments and War Production in Nazi Germany 1942–45.
William Calley, former U.S. Army officer found guilty of murder for his role in the Mỹ Lai massacre.
General Tikka Khan, aka "Butcher of Bengal" was a notorious Pakistan Army General known for his war crimes in Bangladesh during the Indo-Pakistani War of 1971.
Ali Hassan Abd al-Majid al-Tikriti, more commonly known by his nickname "Chemical Ali", executed by post-Ba'athist Iraq for his leadership of the gassing of Kurdish villages during the Iran-Iraq War; also governor of illegally occupied Kuwait during the First Gulf War
Ratko Mladić, indicted for genocide amongst other violations of humanitarian law during the Bosnian War; he was captured in Serbia in May 2011 and was extradited to face trial in The Hague, wherein he was found guilty and sentenced to life in prison.