Since you mention the Great War, I can provide some answer there.
In the British army, a soldier accused of murdering another soldier would be charged with murder, a capital crime. The chief difference between a murder in the military world and one in the civilian world was that the soldier would be tried by a court-martial, rather than a civilian court.
Being a capital offense, murder had to be tried by a general court-martial, being the highest tier of court-martial available in the British system. It required five officers to judge, (nine if on British or Indian soil,) the presiding officer had to be at least a Major, and it could only be convened on a warrant from the King or the soldier's commanding general officer.
It's not the best source in the world, but you can look at a quick and simple description of the British military justice system of the period here.
Generally, you'll find similar systems for all the other militaries in the modern era. Militaries require a means of enforcing discipline and administering justice, and murder is quite naturally something that falls under that purview.