Forty suspected Unionists in Confederate Texas were hanged at Gainesville in October 1862. Two others were shot as they tried to escape. Although the affair reached its climax in Cooke County, men were killed in neighboring Grayson, Wise, and Denton counties. Most were accused of treason or insurrection, but evidently few had actually conspired against the Confederacy, and many were innocent of the abolitionist sentiments for which they were tried.

The Great Hanging was the result of several years of building tension. The completion of the Butterfield Overland Mail route from St. Louis through Gainesville brought many new people from the upper South and Midwest into Cooke County. By 1860 fewer than 10 percent of the heads of households owned slaves. The slaveholders increasingly feared the influence of Kansas abolitionists in every unrest. In the summer of 1860 several slaves and a northern Methodist minister were lynched in North Texas. Cooke and the surrounding counties voted against secession and thus focused the fears of planters on the nonslaveholders in the region. Rumors of Unionist alliances with Kansas Jayhawkers and Indians along the Red River, together with the petition of E. Junius Foster, editor of the Sherman Patriot, to separate North Texas as a new free state, brought emotions to a fever pitch.

Actual opposition to the Confederacy in Cooke County began with the Conscription Acts of April 1862. Thirty men signed a petition protesting the exemption of large slaveholders from the draft and sent it to the Congress at Richmond. Brig. Gen. William Hudson, commander of the militia district around Gainesville, exiled their leader, but others who remained used the petition to enlist a nucleus for a Union League in Cooke and nearby counties. The members were not highly unified, and their purposes differed with each clique. Most joined to resist the draft and provide common defense against roving Indians and renegades. Rumors began to circulate, however, of a membership of over 1,700 and of plans for an assault when the group had recruited enough men. Fearing that the stories of Unionist plots to storm the militia arsenals at Gainesville and Sherman might prove to be true, Hudson activated the state troops in North Texas in late September 1862 and ordered the arrest of all able-bodied men who did not report for duty.

Texas state troops led by Col. James G. Bourland arrested more than 150 men on the morning of October 1. In Gainesville he and Col. William C. Young of the Eleventh Texas Cavalry, home on sick leave, supervised the collection of a "citizen's court" of twelve jurors. Bourland and Young together owned nearly a fourth of the slaves in Cooke County, and seven of the jurors chosen were slaveholders. Their decision to convict on a majority vote was a bad omen for the prisoners, all of whom were accused of insurrection or treason and none of whom owned slaves. The military achieved its goal of eliminating the leadership of the Union League in Cooke County when the jury condemned seven influential Unionists, but an angry mob took matters into its own hands and lynched fourteen more before the jurors recessed. Violence in Gainesville peaked the next week when unknown assassins killed Young and James Dickson. The decision already made to release the rest of the prisoners was reversed, and many were tried again. Nineteen more men were convicted and hanged. Their execution was supervised by Capt. Jim Young, Colonel Young's son. Brig. Gen. James W. Throckmorton prevented the execution of all but five men in Sherman, but in Decatur, Capt. John Hale supervised a committee that hanged five suspects. A Southern partisan shot a prisoner in Denton.

Texas newspapers generally applauded the hangings, disparaged the Unionists as traitors and common thieves, and insisted they had material support from Kansas abolitionists and the Lincoln administration. The state government condoned the affair. Gov. Francis Richard Lubbock, an ardent Confederate, praised Hudson for his actions, and the legislature paid the expenses of the troops in Gainesville. Articles from the Texas press were reprinted across the South. President Jefferson Davis, embarrassed, abandoned his demand for an inquiry into a similar incident involving northern troops in Palmyra, Missouri, and dismissed Gen. Paul Octave Hébert as military commander of Texas for his improper use of martial law in several instances, including the hangings. The northern press heralded the story as another example of Rebel barbarism. Andrew Jackson Hamilton, a former congressman from Texas and a Unionist, had been speaking in the North warning of the danger to loyal citizens in Texas. Reports of the Great Hanging and other incidents lent support to his campaign and led to his appointment as military governor of Texas and the disastrous Red River campaign of 1864.

The unrest did not end with the hangings in North Texas. Albert Pike, Confederate brigadier general in charge of Indian Territory, was implicated in testimony and arrested. Although later released, Pike continued to be regarded with suspicion and served the rest of the war in civilian offices. Capt. Jim Young killed E. Junius Foster for applauding the death of his father. He also tracked down Dan Welch, the man he believed to be his father's assassin, then returned with him to Cooke County and had him lynched by some of the family slaves. The Union League was powerless to exact revenge; many members fled along with the families of the slain prisoners, leaving bodies unclaimed for burial in a mass grave. A North Texas company of Confederate soldiers in Arkansas learned of the executions and almost mutinied, but tempers were defused by Brig. Gen. Joseph O. Shelby, their commander. Several men later deserted to return home, but Shelby prevented a mass assault on Gainesville. The half-hearted prosecution of those responsible for the hangings after the war, resulting in the conviction of only one man in Denton, increased resentment among the remaining Unionists in North Texas, but the failure of a Union League march on Decatur indicated the futility of further attempts at retaliation.