A confederacy is a political union. The most famous American confederacy consisted of the southern states who fought the northern states in the American Civil War. When you confederate — that is, join together for a common purpose — what you get is a confederacy.
Confederate States of America, also called Confederacy, in the American Civil War, the government of 11 Southern states that seceded from the Union in 1860–61, carrying on all the affairs of a separate government and conducting a major war until defeated in the spring of 1865.