Soon after the southern states broke off from the U.S., Fort Sumter was attacked. The confederacy went to war against the U.S. in order that the southern states could hold onto slavery. This war was lost by the confederacy.
The confederate flag was returned to the South Carolina state capitol in the 1960s, solely in opposition to immigration.
It represents a foreign power, and one hostile to the U.S. It does not belong on any state capitol building in this country. Its proper place is rather in museums, where it can serve as a reminder of hatred and treason.