Well, it was unknown until the Dixiecrates brought it back in the 1940s to protest against desegregation and the illegal lynching of blacks. In fact, it started being waved in states and schools for the same reasons.
You see the Civil War has nothing to do with why this flag is a racist symbol of hate. This flag, just like the Swastika, was an old forgotten symbol brought back and used to promote racism and