You may or may not recall, but the only the first twelve amendments to the Constitution existed at the end of the Civil War. These amendment, the Bill of Rights, plus two more, along with the original Constitution, were rights that protected the people from the federal government. But there was no protection from whatever state governments chose to do.
After the Civil War, since states were not constrained by the Constitution or its amendments, they were able to deprive people of rights with impunity. And the Southern states proceeded to do so, out of anger over the war and prejudice against the now freed African-Americans. They made it impossible or nearly impossible for freed slaves to vote, own property, or be treated like equal citizens in any way whatsoever. The statutes passed in the Southern states are often referred to as "Jim Crow" laws.
These laws led the federal government to realize that winning the Civil War was a hollow victory if the Southern states could continue to deprive free people of all or most of the attributes of freedom. Thus, the next amendments established federal control over various freedoms, protecting particularly black American not only from the federal government, but also from the state governments.
I have provided a link to the Constitution and its amendments. Look carefully at the dates of the amendments after the Bill of Rights, and you will see how and when federalism evolved.
Racial issues played a major role in the resumption of federalism in the late 1800s. After the Civil War, federalism had sort of died for a little while as the national government took over Reconstruction of the South. After 1877, however, the federal government backed off of the South and a more states' rights attitude toward federalism resulted.
The major reason for this move towards states' rights was racial. The South wanted to be left alone to treat its black people as it saw fit. Because most Northerners did not really care if blacks were segregated or if they had the right to vote, this was not really challenged.