The Uniform Code of Military Justice (UCMJ) is the judicial code which pertains to members of the United States military. Under the UCMJ, soldiers can be charged, tried, and convicted of a range of crimes, including common-law crimes such as arson, and military-specific crimes like desertion. In addition to applying to members of the military, the UCMJ is also applied to prisoners of war held by the United States.
Since 1776, the United States has had some form of military code of justice, known initially as the Articles of War. In the 20th century, the military and the government recognized that the Articles of War no longer met the needs of the modern military. With the organization of the military branches under the Department of Defense in 1947, Congress took advantage of the opportunity to re-write the rules of military justice to address emerging issues.
The UCMJ was passed by Congress in 1950, and it became effective in 1951. The document was written entirely by civilians, with the assistance of military advisers, reflecting the fact that the military in the United States is headed by a civilian, and accountable to the citizens of the United States. The 12 subchapters of the UCMJ spell out definitions, polities, procedures, punishable crimes under the UCMJ, and penalties.
In addition to the UCMJ, the military also uses the Manual for Courts-Martial, which spells out the specific procedures used in courts-martial. Both documents are designed to balance the need for individual rights with the need for a system of justice which accommodates the discipline requirements of the military. Under the UCMJ, a soldier is entitled to the use of a counsel, and to know the charges leveled against him or her. Soldiers also have the right to remain silent, and they must be informed of this right.
Active duty soldiers are all covered by the UCMJ, along with people who have been commissioned or activated in times of need, such as members of the National Guard. The UCMJ also covers people in military academies, along with some retired and reserved members of the military, depending on the situation and the crime. ROTC cadets are not included in the UCMJ, although they are usually thoroughly educated about it because they will someday be subject to the UCMJ, and some may go on to become counsels for soldiers charged under the UCMJ.