It is the duty of every government to give protection to its citizens, of whatever class, color, or condition, and especially to those who are duly organized as soldiers in the public service. The law of nations and the usages and customs of war, as carried on by civilized powers, permit no distinction as to color in the treatment of prisoners of war as public enemies. To sell or enslave any captured person on account of his color, and for no offense against the laws of war, is a relapse into barbarism and a crime against the civilization of the age.
The Government of the United States will give the same protection to all its soldiers, and if the enemy shall sell or enslave anyone because of his color the offense shall be punished by retaliation upon the enemy's prisoners in our possession.
It is therefore ordered, That for every soldier of the United States killed in violation of the laws of war a rebel soldier shall be executed, and for every one enslaved by the enemy or sold into slavery a rebel soldier shall be placed at hard labor on the public works and continued at such labor until the other shall be released and receive the treatment due to a prisoner of war.
Abraham Lincoln, Executive Order—Retaliation Online by Gerhard Peters and John T. Woolley, The American Presidency Project https://www.presidency.ucsb.edu/node/203220