A list of union soldiers executed during the war is at the following link:
http://genealogytrails.com/ken/unionsoldier_executions.html
Gen Jacob Cox describes the execution of Richard Gatewood, 1st KY, in his Reminiscences:
" The work of the military courts gave me one very unpleasant duty to perform, which, happily, was of rare occurrence and never again fell to my lot except on a single occasion in North Carolina near the close of the war. A soldier of the First Kentucky Volunteers was condemned to death for desertion, mutiny, and a murderous assault upon another soldier. The circumstances were a little peculiar, and gave rise to fears that his regiment might resist the execution. I have already mentioned the affair of Captain Gibbs [Footnote: Appointed Captain and Assistant Commissary of Subsistence, U. S. Vols., October 1.] who had shot down a mutinous man of the Second Kentucky at Gauley Bridge in the summer, and who had been acquitted by a court-martial. The camp is very like a city in which popular impressions and rumors have quick circulation and large influence. The two Kentucky regiments were so closely related as to be almost one, and were subject to the same influences. A bitter feeling toward Captain Gibbs prevailed in them both, and camp demagogues busied themselves in trying to make mischief by commenting on the fact that the officer was acquitted whilst the private was condemned. There was not a particle of justice in this, for the one had simply suppressed a mutiny, whereas the other was inciting one. But it is not necessary for complaints to be just among those who are very imperfectly informed in regard to the facts, and very unpleasant reports were received as to the condition of things in the regiment to which the condemned man belonged.
It is the military custom, in executions by shooting, to select the firing party from the regiment to which the condemned man belongs. To have changed the rule would have looked like timidity, and I determined that it must not be done, but resolved upon an order of procedure which would provide, as far as possible, against the chances of interference. On such occasions the troops are usually paraded upon three sides of a hollow square, without arms, the place of execution being in the middle of the open side, where the prisoner kneels upon his coffin. The place chosen was in the meadows on the lower side of the Elk River, opposite Charleston, a short distance from the regimental camp. The camps of two other regiments at the post were half a mile from the place of execution. These regiments were, therefore, marched to the field with their arms. That to which the prisoner belonged was marched without arms to its position as the centre of the parade, and the others were formed on their right and left at right angles, thus forming the three sides of the enclosure. The arms of these last regiments were stacked immediately behind them where they could be seized in a moment, but the parade was formed without muskets. Captain Gibbs was on duty as commissary at my headquarters, and his appearance with the staff would have been unpleasant to himself as well as a possible cause of excitement in the Kentucky regiment. To solve the difficulty without making a significant exception, I ordered only the personal staff and the adjutant-general with the chief surgeon to accompany me, leaving out the administrative officers of both quartermaster's and commissary's departments.
When the parade was formed, I took my place with my staff at the right of the line, and, as upon a review, rode slowly down the whole line, on the inside of the square. In going along the front of the First Kentucky, I took especial pains to meet the eyes of the men as they were turned to me in passing, desirous of impressing them with my own feeling that it was a solemn but inevitable duty. Immediately after we returned to our places, the music of the dead-march was heard, and an ambulance was seen approaching from the camp, escorted by the provost-marshal and the execution party with the music. The solemn strains, the slow funereal step of the soldiers, the closed ambulance, the statue-like stillness of the paraded troops made an impression deeper and more awful than a battle scene, because the excitement was hushed and repressed. The ambulance stopped, the man was helped out at the back, and led by the provost-marshal to his place upon the coffin, where he was blindfolded. The firing party silently took its place. The muskets were cocked and aimed, while the noise of the retiring ambulance covered the sound. The provost-marshal, with a merciful deception, told the prisoner he must wait a moment and he would return to him before the final order, but stepping quickly out of the range of the muskets, he gave the signal with his handkerchief, and the man fell dead at the volley, which sounded like a single discharge. The detail of soldiers for the firing had been carefully instructed that steadiness and accuracy made the most merciful way of doing their unwelcome duty. The surgeon made his official inspection of the body, which was placed in the coffin and removed in the ambulance. The drums and fifes broke the spell with quick marching music, the regiments took their arms, sharp words of command rattled along the lines, which broke by platoons into column and moved rapidly off the field.
I confess it was a relief to have the painful task ended, and especially to have it ended in the most perfect order and discipline. The moral effect was very great, for our men were so intelligent that they fully appreciated the judicial character of the act, and the imposing solemnity of the parade and execution made the impression all the more profound. "