In military terminology, desertion is the abandonment of a "duty" or post without permission from one's Government or superior. The term AWOL is an acronym for "Absence Without Leave." Ultimate "duty" or "responsibility," however, under International Law, is not necessarily always to a "Government" nor to a "superior," as seen in the fourth of the Nuremberg Principles, which states:
"The fact that a person acted pursuant to order of his Government or of a superior does not relieve him from responsibility under international law, provided a moral choice was in fact possible to him."
"Under UN General Assembly Resolution 177 (II), paragraph (a), the International Law Commission was directed to 'formulate the principles of international law recognized in the Charter of the Nuremberg Tribunal and in the judgment of the Tribunal.'"
In 1998, the United Nations Office of the High Commissioner for Human Rights document called “Conscientious objection to military service, United Nations Commission on Human Rights resolution 1998/77” recognized that “persons [already] performing military service may develop conscientious objections” while performing military service. 
In the United Kingdom, United States and Canada, military personnel become AWOL (US: Absence Without Leave) or AWL (UK, Canada and Australia: Absent Without Leave), all of which are pronounced /ˈeɪwɔːl/, when they are absent from their post without a valid pass or leave. The United States Marine Corps and United States Navy generally refer to this as Unauthorized Absence, or "UA." Such people are dropped from their unit rolls after 30 days and then listed as deserters. However, as a matter of U.S. military law, desertion is not measured by time away from the unit, but rather:
People who are away for more than 30 days but return voluntarily or indicate a credible intent to return may still be considered AWOL, while those who are away for fewer than 30 days but can credibly be shown to have no intent to return (as by joining the armed forces of another country) may nevertheless be tried for desertion or in some rare occasions treason if enough evidence is found.
In the United States, before the Civil War, deserters from the Army were flogged, while after 1861 tattoos or branding were also adopted. The maximum U.S. penalty for desertion in wartime remains death, although this punishment was last applied to Eddie Slovik in 1945. No US serviceman has received more than 18 months imprisonment for desertion or missing movement during the Iraq war.
AWOL/UA may be punished with nonjudicial punishment (NJP; called "office hours" in the U.S. Marines Corps); and may punished by Court Martial under Article 86 of the Uniform Code of Military Justice for repeat or more severe offenses.
Also, "Missing Movement" is another term which is used to describe when a particular serviceman fails to arrive at the appointed time to deploy (or "move out") with his assigned unit, ship, or aircraft; in the United States military, it is a violation of the Article 87 of the Uniform Code of Military Justice. The offense is similar to AWOL, but considered more severe.
Less severe is "Failure to Repair," consisting of missing a formation, or failing to appear at an assigned place and time when so ordered.
Rogue military units are usually when an officer deserts with most or all troops under his command. This usually leads to a creation of a new faction. This is typically caused when their country is near defeat, during a Societal collapse, or following a mutiny. Examples include rogue armies during the Decline of the Roman Empire. During the Soviet advance toward Germany in World War II the Russian Liberation Army deserted, fighting German and Soviet forces.
The desertion rate for American soldiers in the War of 1812 was 12.7%, according to available service records. Desertion was especially common in 1814, when enlistment bonuses were increased from $16 to $124, inducing many men to desert one unit and enlist in another to get two bonuses.
In the Mexican–American War, high desertion rates were a major problem for the Mexican army, depleting forces on the eve of battle. Most of the soldiers were peasants who had a loyalty to their village and family but not to the generals who conscripted them. Often hungry and ill, never well paid, under-equipped and only partially trained, the soldiers were held in contempt by their officers and had little reason to fight the Americans. Looking for their opportunity, many slipped away from camp to find their way back to their home village.
The desertion rate in the U.S. army was 8.3% (9,200 out of 111,000), compared to 12.7% during the War of 1812 and usual peacetime rates of about 14.8% per year. Many men deserted in order to join another U.S. unit and get a second enlistment bonus. Others deserted because of the miserable conditions in camp, or were using the army to get free transportation to California, where they deserted to join the California gold rush.
Several hundred deserters went over to the Mexican side; nearly all were recent immigrants from Europe with weak ties to the U.S. The most famous group was the Saint Patrick's Battalion, about half of whom were Catholics from Ireland. The Mexicans issued broadsides and leaflets enticing U.S. soldiers with promises of money, land bounties, and officers' commissions. Mexican guerrillas shadowed the U.S. Army, and captured men who took unauthorized leave or fell out of the ranks. The guerrillas coerced these men to join the Mexican ranks—threatening to kill them if they failed to comply. The generous promises proved illusory for most deserters, who risked getting shot if captured by U.S. forces. About fifty of the San Patricios were tried and hanged following their capture at Churubusco in August 1847.
Desertion was a major factor for the Confederacy in the last two years of the war. According to Weitz (2000), Confederate soldiers fought to defend their families, not a nation. He argues that a hegemonic "planter class" brought Georgia into the war with "little support from non-slaveholders" (p. 12), and the ambivalence of non-slaveholders toward secession, he maintains, was the key to understanding desertion. The privations of the home front and camp life, combined with the terror of battle, undermined the weak attachment of southern soldiers to the Confederacy. For Georgia troops, Sherman's march through their home counties triggered the most desertions.
Adoption of a localist identity caused soldiers to desert as well. When soldiers implemented a local identity, they neglected to think of themselves as Southerners fighting a Southern cause. When they replaced their Southern identity with their previous local identity, they lost their motive to fight and, therefore, deserted the army.
One example of desertion in the Civil War was Confederate soldier Arthur Muntz, who was killed by his fellow soldiers after deserting at The First Battle of Bull Run. In many cases, in the early years of the war, the Confederate Home Guard dealt with deserters. For a time, the Confederate government offered a bounty to be paid for the capture and return of deserters. However as the war progressively got worse for the south, often Home Guard units would deal with desertion as they saw fit, whether that be by execution or imprisonment.
In Arkansas, many units deserted completely when rumors spread that local Indians had raided towns and scalped citizens, with the soldiers feeling their place was at home rather than fighting in the war. There were also instances across the southern states where whole units deserted together, banding together and living in the mountains, at times fighting against Union Army regulars if forced to do so, but also raiding civilian farms to obtain food or supplies.  The fictional story of a wounded Confederate deserter is told in the novel Cold Mountain, who at the end of the Civil War walks for months to return home to the love of his life after receiving her letters pleading him to come home. Many Confederate units had signed on, initially, for a one year service, and felt completely justified in walking away when they'd reached their breaking point. By the war's end, it was estimated that the Confederacy had lost 103,400 soldiers to desertion. 
The Union Army also faced large scale desertions. Confederate forces lost fewer to desertion than did the northern forces. This has been partly attributed to the southern soldiers fighting a defensive war, on their own ground, rather than an offensive war of invasion, which gave the southern soldiers a sense that they were defending their homeland which is always an advantage in any war. In addition up until late 1863 the South had many victories, in fact more than the North, and many northern soldiers felt the war was a lost cause. For example New York alone suffered 44,913 desertions by the war's end, with Pennsylvania having 24,050 and Ohio having 18,354, not to mention the desertions faced by the other northern states. 
"306 British and Commonwealth soldiers [were] executed for...desertion during World War I," records the Shot at Dawn Memorial. "During the period between August 1914 and March 1920 more than 20,000 servicemen were convicted by courts-martial of offences which carried the death sentence. Only 3,000 of those men were ordered to be put to death and of those just over 10% were executed...." 
Over 21,000 US military personnel were convicted and sentenced for desertion during the 3.5 years of American involvement in World War II. Of these, 49 were sentenced to death, but only one soldier, Eddie Slovik, was actually executed for desertion; he being the only one after the Philippine–American War.
Of the Germans who deserted the Wehrmacht, 15,000 men were executed. In June 1988 the Initiative for the Creation of a Memorial to Deserters came to life in Ulm. A central idea was, "Desertion is not reprehensible, war is".
Order No. 270, dated August 16, 1941, was issued by Joseph Stalin. The order required superiors to shoot deserters on the spot. Their family members were subjected to arrest. Order No. 227 directed that each Army must create "blocking detachments" (barrier troops) which would shoot "cowards" and fleeing panicked troops at the rear. The Soviets executed 158,000 soldiers for desertion.
Approximately 50,000 American servicemen deserted. Some of these migrated to Canada. Among those who deserted to Canada were Andy Barrie, host of Canadian Broadcasting Corporation Radio's Metro Morning, and Jack Todd, award-winning sports columnist for the Montreal Gazette.
According to the Pentagon, more than 5,500 military personnel deserted in 2003–2004, following the Iraq invasion and occupation. The number had reached about 8,000 by the first quarter of 2006. Another report stated that since 2000, about 40,000 troops from all branches of the military have deserted, also according to the Pentagon. More than half of these served in the US Army . Almost all of these soldiers deserted within the USA. There has only been one reported case of a desertion in Iraq. The Army, Navy and Air Force reported 7,978 desertions in 2001, compared with 3,456 in 2005. The Marine Corps showed 1,603 Marines in desertion status in 2001. That had declined by 148 in 2005.
As per media reports, as many as 1,700 personnel from Pakistan army, para-military and police have left the armed forces fearing militant attacks during the FATA and Swat operations(2009).The attack on the Police Training Centre (PTC) in Lahore is the final outcome of the terrorist's strategy to target the security personnel in Pakistan and thus isolate them as vulnerable targets,sitting ducks who can be targeted anytime, anywhere.The soldiers and cops who have deserted have adverted it through the local newspapers. "Many of them have published it in the local papers that they are no more in uniformed services. The idea is to safeguard themselves and their families from the militant groups.Pakistan government was more worried about the arms and ammunition that the soldiers have surrendered to the militant groups instead of depositing it with the government.Meanwhile, the steps taken by the Pakistan government to stop this gradual, but steady outflow of soldiers too have miserably failed. Some months back, the government decided to increase the insurance cover for the soldiers, but that too has failed to create a positive environment.
So light we were, so right we were, so fair faith shone,
And the way was laid so certainly, that, when I'd gone,
What dumb thing looked up at you? Was it something heard,
Or a sudden cry, that meekly and without a word
You broke the faith, and strangely, weakly, slipped apart.
You gave in - you, the proud of heart, unbowed of heart!
Was this, friend, the end of all that we could do?
And have you found the best for you, the rest for you?
Did you learn so suddenly (and I not by!)
Some whispered story, that stole the glory from the sky,
And ended all the splendid dream, and made you go
So dully from the fight we know, the light we know?
O faithless! the faith remains, and I must pass
Gay down the way, and on alone. Under the grass
You wait; the breeze moves in the trees, and stirs, and calls,
And covers you with white petals, with light petals.
There it shall crumble, frail and fair, under the sun,
O little heart, your brittle heart; till day be done,
And the shadows gather, falling light, and, white with dew,
Whisper, and weep; and creep to you. Good sleep to you!
The offence of naval or military desertion is constituted when a man absents himself with the intention either of not returning or of escaping some important service, such as embarkation for foreign service, or service in aid of the civil power. In the United Kingdom desertion has always been recognized by the civil law, and until 1827 (7 & 8 Geo. IV. c. 28) was a felony punishable by death. It was subsequently dealt with by the various Mutiny Acts, which were replaced by the Army Act 1881, renewed annually by the Army (Annual) Act. By § 12 of the act every person subject to military law who deserts or attempts to desert, or who persuades or procures any person to desert, shall, on conviction by court martial, if he committed the offence when on active service or under orders for active service, be liable to suffer death, or such less punishment as is mentioned in the act. When the offence is committed under any other circumstances, the punishment for the first offence is imprisonment, and for the second or any subsequent offence penal servitude or such less punishment as is mentioned in the act. § 44 contains a scale of punishments, and §§ 175-184 an enumeration of persons subject to military law. By § 153 any person who persuades a soldier to desert or aids or assists him or conceals him is liable, on conviction, to be imprisoned, with or without hard labour, for not more than six months. § 154 makes provision for the apprehension of deserters. § 161 lays down that where a soldier has served continuously in an exemplary manner for not less than three years in any corps of regular forces he is not to be tried or punished for desertion which has occurred before the commencement of the three years. Desertion from the regular forces can only be tried by a military court, but in the case of the militia and reserve forces desertion can be tried by a civil court. The Army Act of 1881 made a welcome distinction between actual desertion, as defined at the commencement of this article, and the quitting one regiment in order to enlist in another. This offence is now separately dealt with as fraudulent enlistment; formerly, it was termed "desertion and fraudulent enlistment," and the statistics of desertion proper were consequently and erroneously magnified. The gross total of desertions in the British Army in an average year (1903-1904) was nearly 4000, or 1 4% of the average strength of the army, but owing to men rejoining from desertion, fraudulent enlistment, &c., the net loss was no more than 1286, i.e. less than 5%. The army of the United States suffers very severely from desertion, and very few deserters rejoin or are recaptured (see Journal of the Roy. United Service Inst., December 1905, p. 1469). In the year 1900-1901, 3110 men deserted (4.3% of average strength); in 1901-1902, 4667 (or 5.9%); in 1904-1905, 6 553 (or 6.8%); and in 1905-1906, 6258 out of less than 60,000 men, or 7.4%.
In all armies desertion while on active service is punishable by death; on the continent of Europe, owing to the system of compulsory service, desertion is infrequent, and takes place usually when the deserter wishes to leave his country altogether. It was formerly the practice in the English army to punish a man convicted of desertion by tattooing on him the letter "D" to prevent his re-enlistment, but this has been long abandoned in deference to public opinion, which erroneously adopted the idea that the "marking" was effected by red-hot irons or in some other manner involving torture. The Navy Discipline Act 1866, and the Naval Deserters Act 1847, contain similar provisions to the Army Act of 1881 for dealing with desertions from the navy. In the United States navy the term "straggling" is applied to absence without leave, where the probability is that the person does not intend to desert. The United States government offers a monetary reward of between $20 and $30 for the arrest and delivery of deserters from the army and navy.
In the British merchant service the offence of desertion is defined as the abandonment of duty by quitting the ship before the termination of the engagement, without justification, and with the intention of not returning.
Desertion is also the term applied to the act by which a man abandons his wife and children, or either of them. Desertion of a wife is a matrimonial offence; under the Matrimonial Causes Act 1857, a decree of judicial separation may be obtained in England by either husband or wife on the ground of desertion, without cause, for two years and upwards (see also Divorce).
For the desertion of children see CHILDREN, LAW RELATING TO; INFANT. (T. A. I.)