Many confederates took "The Oath" which swore allegience to the Union, to avoid prison or to be freed. Here is an example:
Camp Butler, Illinois
I, John Doe, private in Co. I 30th Tennessee Infantry, a prisoner of war, do hereby swear in the presence of the Almighty God that I will faithfully support and protect and defend the Constitution of the United States and the Union of the States of the Union thereunder; and that I will, in like manner, abide by and faithfully support the acts of Congress during the existing rebellion with reference to slaves, so long and so far as not repealed, modified, or held void by Congress, or by a decision of the Supreme Court; and that I will, in like manner abide by and faithfully support all the proclamations of the President during the existing rebellion having reference to slavery, so long and so far as not modified or declared void by a decision of the Supreme Court; so help me God
Signed John Doe.
(Ferguson, Edwin L. Sumner County, Tennessee in the Civil War printed by author. Tompkinsville, Kentucky. 1972.)
Alice Williamson Diary - Table of Contents
A project of The Digital Scriptorium, Special Collections Library, Duke University.