late 14c., "contract between two or more persons, states, etc., for mutual support or joint action," from Anglo-French confederacie (Old French confederacie), from stem of Latin confoederare "to unite by a league," from assimilated form of com "with, together" (see con-) + foederare, from foedus "a league" (from suffixed form of PIE root *bheidh- "to trust, confide, persuade").
Also late 14c. as "an aggregation of persons, states, etc., united by a league, a confederation. At first in reference to leagues of classical Greek states (Aetolian, Delian, Achaean, etc.), later of the Netherlands. In 17c.-18c. often in a bad sense, especially "a conspiracy against a superior."
The word was used of the United States of America under (and in) the Articles of Confederation (1777-1788). In reference to the national organization of the seceding Southern states (1861-1865, also Southern Confederacy) from 1861, in the constitution of the Confederate States of America, formed by constitutional convention at Montgomery, Alabama, March 11, 1861.
Confederacy now usually implies a looser or more temporary association than confederation, which is applied to a union of states organized on an intentionally permanent basis. [OED]