Since the Confederacy's 3.954m slaves replaced white wage labor during the war and also worked in sectors like Virginia's and Birmingham's steel industry, it makes sense to add them to its 7.58m free population. Just as the Nazi war economy could never have lasted as long as it did without European slave labor, the Confederacy's war effort could not have endured so long without black slave labor. Add the free and slave populations together and you get: 11.533m, far more than 9m.
The Union's capture of large parts of Missouri, Kentucky, Vicksburg and New Orleans and Tennessee in 1862 and 1863 might have reduced the Confederate population to the 9m figure you gave. But you didn't include that nuance.
Wikipedia has state by state 1860 census figures. https://en.wikipedia.org/wiki/1860_United_States_census