It may have racist connotations to some, but it could also mean something like, "If I knew we would lose the war and be run by the North (liberals/Obama etc.), then I would have released the slaves and picked my own cotton". I guess its popular because no one knows what "this" is, so they put whatever grievance they have as the "this" in their mind.
This is why I have no bumper stickers on my car, because people see what they want in them.
Could be, I suppose, seems likely that's it, but it doesn't seem apparent just reading it. Must be a quote or something that a certain region would be aware of or something.
It basically carries the same connotation as "go back to africa" remarks. Arguably not racist per se, but for reasons easily figured nearly always said by racists/conservatives.