Total Union executions during the war 267. For the following:
- Murder - 64
- Desertion - 159
- Rape -22
- Mutiny - 18
- Spying & Other - 13
Executions for desertion only occurred in the last two years of the war. Accordingly to Alotta only 3 Union soldiers were executed for Desertion from April 1861-April 1863. Further, execution *merely* for desertion from May 1863-April 1865, seem to have been fairly rare. Usually those executed had deserted before, committed a crime while AWOL, resisted arrest, were bounty jumpers, substitutes, or were caught deserting to the enemy. The Bounty jumpers executed in the last year of the war seemed to have been almost all foreign, with a large number of Canadians involved.
Since only 159 of the estimated 80,000 deserters were executed it seems that Union officials were using it as a deterrent.
There's also an interesting geographical disparity in the executions. Soldiers from the Middle-west were much more likely NOT to be executed. While the Midwest (Wisconsin (1), Iowa (o), Minnesota (0), Indiana, Illinois, Michigan, and Ohio) furnished approximately 1/3 of the men for the union army, only 10 percent (25 of the 267 executed) were from those states. OTOH, Vermont & New Hampshire, with a large number of Canadians Bounty jumpers and foreign substitutes furnished only 2 percent of the Union troops but had 21 men executed.