Did the Americans ever fight a war with Great Britain for the freedom of slaves?
The United States never fought a war with Great Britain that was fundamentally about freedom for slaves from the perspective of either nation. However, in the two wars fought between the United States (including as colonies) and Great Britain, wartime chaos, and to some extent British policy, created a chance for enslaved people to gain their freedom. The most famous example of this is Virginia royal governor Dunmore's proclamation of 1775 in which he promised freedom to all enslaved people who would fight with him against the rebels in the colony. Thousands of African-Americans, and many poor white Virginians, took advantage of the offer, though many did not gain their freedom. In the southern colonies, many slaves voted against slavery with their feet by flocking Cornwallis's columns when they marched through the Carolinas, and many escaped to British ships patrolling the coast even before the invasion. British responses varied from welcoming escapees with open arms to sending them to the West Indies with Loyalist masters, but the point is that many slaves took advantage of the chaos of the war to strike out on their own. Something similar happened in the War of 1812 as many African-Americans flocked to British blockading ships in Maryland and Virginia. As historian Alan Taylor has recently written, "as the enemies of the slaves' enemies in the War of 1812, the British became their friends."