The civil war is a tricky matter for libertarians. Who was right, and who was wrong?
I can say without reservations that slavery was in direct opposition to the principles of libertarianism, but ultimately, the civil war wasn't about slavery. Lincoln would have been happy to let slavery continue, particularly considering the alternative. He said as much.
However, the civil war itself is a tricky matter. Was it, in fact, just? The South's justification for leaving the United States was one of state rights; the right of state sovereignty, and the principles of limited government, which even Lincoln acknowledged were important. (I saw "even" because the war powers Lincoln utilized flew in the face of limited powers.) The federal government of the era was definitely interfering in strictly state matters; the persecution of the Mormons comes to mind - without which persecution, the federal gay marriage debate would be irrelevant - the federal government didn't involve itself in marriage until the Mormons, and did so then to target polygamist practices. Which casts the modern Church of LDS's stance on gay marriage in an ironic light, to my eye. Critically, I believe the civil war in fact helped the Mormon Church, because Lincoln, not eager to start another civil war, adjusted federal policy to give Utah greater independence and treated the territory with greater respect. Considering the treatment of Utah before and during the civil war, this was a necessary step.
There were very real and very good justifications for secession, regardless of the immorality of slavery.
More, the United States government had little justification in attacking the Confederacy - even presuming freedom of others is an objective worth waging war over, the costs of waging war in the name of freedom are paid in freedom and lives: Somebody person died for every five slaves freed; another was injured, no mean matter in a time when battlefield injuries frequently led to amputation. Not to mention the civil liberties abrogated in the process; Lincoln imprisoned journalists and even congressmen who disagreed with his policies. Depending on how you weigh these issues, the civil war might manage to come out ahead, or behind, but it certainly did not have overwhelming moral advantage.
The previous paragraph, however, contains a falsehood: The United States government -didn't- attack the Confederacy. The Confederacy can't in full honesty be said to have initiated force, either; it prevented a US military vessel from entering into its territory, which initiated the war. To reference Dave Barry, the behavior of the two sides in the conflict were as two teenagers driving cars through an intersection, each refusing to yield right of way, colliding at two miles per hour. The war is what happened next.
So in the matter of the civil war, I can conclusively say, that from a moral perspective... everybody was wrong.
And that in the end I think it worked out, more or less, about as well as it could have, given the actors in charge and the political environment of the era. The United States is more free today as a result of the outcome of that war, which both ended slavery and gave the federal government a -very- staunch reminder of exactly how important state rights are, and prevented another war which was brewing (when it wasn't actually being waged) between the Utah territories and the US federal government, instigated almost in its entirety by federal policy.