Was the view that it was about states rights and all that jazz prevalent during reconstruction? If not, when did it first start to pop up?
I can't speak directly to the issue of states rights, but I would point out what Jefferson Davis argued in The Rise and Fall of the Confederate Government (1881). Davis argued, shortly after Reconstruction Period, that secession was not at all about slavery as a moral issue but purely as an economic issue. The conflict between slave states and free states, according to Davis, was not that the North abhorred slavery as an immoral institution, but that the economic powers that be in the North merely wanted to put down the South's slave based economic system in favor of the North's industrial system.
For instance, he alleges that adding more slave states to the Union would have merely spread out the slaves that already existed (since the import of slaves had already been abolished). With the slaves spread out, fewer slaves would have lived in each state, making the states less dependent on slavery. The states, according to Davis, would then be more likely to abolish slavery on their own. Therefore, the North could not have opposed adding slave states to the Union because they thought slavery was immoral. The North must have opposed adding slave states because they wanted to put down the South.
Thus Davis argues that that the North wasn't really any better than the South on the moral issue of slavery, because they only cared about slavery as an economic institution rather than one that was unethical. In fact, secession might have been justified, because the North was merely trying to boost its own interests at the expense of the South.
I realize that this answer doesn't directly address the Reconstruction period, but it is a justification for the Confederacy from the leader of the Confederacy himself, so it may be an indication of the general sentiments concerning the morality of slavery during and after the Civil War, especially among those who avoided trying to justify slavery as a moral good in and of itself.
There were strong sectional differences in how the war was perceived by the public, but what you're referring to here - the whitewashing of slavery as the cause of the war - is at the heart of what's known as the "The Lost Cause" myth. It was actively promoted by prominent Southern leaders, starting practically as soon as the fighting had stopped.
The initial perpetrators were people like Jubal Early and Dabney Maury, both former Confederate generals and contributors to the Southern Historical Society, which was founded in 1868. Jefferson Davis, as /u/Drcruse notes, got in the act himself with his godawful book (seriously, it's a bad piece of writing), as did a number of others.
It wasn't purely a top-down process - Confederate veterans organizations and auxiliaries like the Sons of Confederate Veterans and United Daughters of the Confederacy really pushed the "noble sacrifice in defense of their homes" angle. Most of the Confederate monuments you see across the South were erected by the UDC in the period between 1880-1910, roughly.
Northerners didn't forget the cause. David Blight's "Race and Reunion" is perhaps the preeminent work on postwar memory and reconciliation, but recent works have challenged his assertion that Northerners forgave their former enemies. Nonetheless, professional academic historians (shamefully) aided the Lost Cause starting in the 1890s with the so-called Dunning School of historians, who helped perpretrate both the myth of the war as a tragic case of futile valor and the myth of Reconstruction as a disastrous social experiment in black equality.
TL;DR: it started very soon after the end of the war, part of an orchestrated effort in the South.
As an aside were the confederate general infantry seen as traitors or were they seen as doing their duty to their cause?