Shortly before the American Civil War began, a census had been taken of the population in York County where Rock Hill is located. Half of the district's 21,800 residents were slaves, integral to local cotton production. The 4,379 white males in the county formed fourteen infantry companies; some of the men joined cavalry or artillery units instead. By the end of the war, 805 of these men had died, and hundreds more were wounded. Men from Rock Hill and York County were involved in many of the major Civil War battles.