Why America Won and the Confederacy Lost
The Revolution and Civil War compared
The other name for the American Civil War, at the time, was the "Second American Revolution."
Or, at least, that's what the Confederates called it during the war. Of course, that ignores the hugely different reasons for the war, and the different moral issues at the root of those reasons. But from their perspective, that name wasn't exactly wrong. Just like the American Revolution was when the United States fought for independence from Britain, who continued to claim them as owing allegiance - in the same way, in the Civil War, the South was fighting for independence from the United States.
The Confederacy lost, of course. And because of those hugely different moral issues, that was a good thing. But, it can be useful to hold the two wars up against each other - as the Confederates did at the time - and try to tease out what led to those different results. In a cold strategic sense, I believe part of it stemmed from how the Confederacy wasn't an ocean away from the Union. But aside from that unchangeable geography, the Confederates also moved much faster to declare independence and formalize themselves as a nation than the Patriots did in the Revolution - and their people weren't as willing to go along with them.
To start with, war had changed in the almost-century between 1775 and 1861. Thanks to railroads and much greater industry, the Union and Confederacy could both field and supply much larger armies than had fought in the Revolution. The South in 1861 wasn't as developed as the North, but it was far more developed than any part of America had been in 17751. The Army of Northern Virginia by itself was larger than the entire Continental Army. What's more, they had new improved guns, much larger artillery, and new tactics enabled by all these differences.
Just from sheer size and supplies, the Confederacy could've easily defeated the Continental Army if by some time-travel magic they'd fought. But in actual history, they were facing a foe - the Union - which could take even greater advantage of those industrial-scale logistics. Also, the Union had enough motivation to keep fighting until they could figure out how best to bring those logistics to bear. Even if Britain had that ability, it might not have been willing to use it. The army that surrendered at Yorktown numbered under 9,000 men, a quarter of the British force in the colonies. The Union also lost about a quarter of its Army of the Potomac at Gettysburg alone - yet no one considered negotiating then, while Yorktown was enough to force Britain to make peace.
What's more, the Union was close enough they could easily bring them to bear into Confederate territory. If the Union had been forced to wage war across an ocean, the challenge of transporting armies and supplies would've been vastly more difficult. Conversely, in the American Revolution, if Britain had been that close to the colonies, it almost certainly would've committed many more troops and resources - potentially enough to change the outcome.
So, this ends up as a disadvantage to the Confederacy.
This greater-scale effort demanded more organization. That was one reason the Confederates almost instantly organized a formal government, well before the war began. Their provisional Congress and Constitutional Convention convened on 4 February 1861, while states were still seceding from the Union, and well before war broke out (at Fort Sumter) the following April. On February 9th, they unanimously chose Jefferson Davis as President, and he quickly started setting up a government. Formally, it was a provisional government, but it operated under a constitution much the same as the permanent constitution, with power divided among multiple branches of government, and with federal and state power delineated. This was all done much the same as the United States government. The war effort, from the beginning, was in the hands of the formal Confederate government. Armies were formally levied and organized.

Meanwhile, the American Revolution started with volunteer militia often living very close to where they were fighting, without any authority larger than the Massachusetts Provincial Congress. General Artemis Ward struggled to turn the militia besieging Boston into an organized army. When Congress belatedly commissioned General George Washington to take over that army, he continued that same struggle. Meantimes, the Continental Congress kept issuing recommendations to states - or urgently imploring they help the war effort - which they often proceeded to ignore.
This might seem to mean the Confederacy was better prepared to fight their war (which they would lose) than the Patriots were to fight theirs (which they would win). In one way, it was. The Confederate armies were better organized and equipped than Washington's Continental Army.
But, it was also a disadvantage because the greater formalization prompted more infighting. When President Davis issued requisitions against the governors of Georgia and North Carolina, he explained it was vital to the war effort - and indeed it was. But the governors repeatedly pushed back, because they saw him encroaching on what they (quite explicably) saw as their own states' rights. If the Continental Congress had done something like this, North Carolina would've considered the request on its own merits. But the greater formalization of the Confederacy invited Davis to issue it as a demand, and North Carolina to see the demand as a precedent and push back for that purpose.
Also, this formalization meant that almost all of the war effort was commanded by one man: President Jefferson Davis, who (like the US President) was Commander-in-Chief of the Confederate armed forces. There were lots of advantages to this, which is why the Founding Fathers made the President commander-in-chief. But there were also disadvantages. As historians point out, Davis was susceptible to grudges which hurt the war effort.
Whether the Confederacy would've governed better by committee than by Davis is an interesting question. The Continental Congress did govern by committee, which had a lot of practical disadvantages; when the Founding Fathers later wrote the Constitution, they invented the Presidency to avoid government by committee. However, I don't believe the various committees of the Continental Congress never tried to direct the Revolutionary War in as much detail as - later - Jefferson Davis directed the Civil War. They put more trust in George Washington than Davis put in his generals. Among other advantages, this meant that Congressmen's personal flaws never hurt their war effort as much as Davis's flaws hurt his.
But an even more significant difference, I believe, is the stickiness of the invading forces.
During the American Revolution, several times, Britain conquered much of the colonies. They occupied Boston and parts of Virginia in 1775, New York City and most of New Jersey in 1776, Philadelphia in 1777, and Georgia and much of South and North Carolina in 1780. Between them, these were most of America's land and manpower and resources.
Yet, Britain lost. They couldn't hold these gains. Essentially every time they conquered territory, if they didn't keep sitting on it, the Patriots would retake it. Some of the time (like Boston and New Jersey), the Continental Army advanced to reconquer it; but more often, local Patriots rose up largely by themselves to throw off British authority again and again.

The Confederacy couldn't replicate this performance. Almost every time, once the Union took land, it held that land. The only exceptions I can think of were the Virginia Peninsula after McClellan's 1862 evacuation, the Red River Campaign, and some very brief Confederate advances (which were quickly repulsed). They barely even tried: some Confederate guerillas operated behind Union lines, but there were never local militias revolting or serious attempts to hold territory.
In other words, people didn't want to fight for the Confederacy the way that their ancestors in the 1770's wanted to fight for America. The Confederate cause didn't hold them.
In fact, we see almost the opposite. Throughout the backwoods and mountains of Confederate-held territory, there were bands of people disaffected with the Confederate government. They didn't believe the Confederate government represented them, didn't believe secession and independence would help them, and didn't support the war. Thousands of them volunteered for the Union Army; thousands more sheltered deserters from the Confederate Army and violently resisted Confederate attempts to exert authority.
The reason the United States was able to hold this territory was that they were able to recruit from it. Besides the white Unionists, there were over 93,000 black Unionist volunteers. After the Emancipation Proclamation, wherever the Union Army advanced, the slaves were free. Many of them were happy to enlist in the Union Army, and the Army was happy to have them. To a large extent, the army that marched south into Tennessee could just keep marching south2 into Mississippi, because whole new regiments of US Colored Troops sprang up to garrison Tennessee behind them.
The British in the Revolution tried to do a similar thing. They saw it was impracticable to garrison all the land they'd conquered, so they tried to depend on local Tories to hold it for them. A few Tory militia regiments were raised. But, there weren't enough of them3. We don't know how many Tories there were in America, but after 1776 - except in the Deep South - there were never enough stepping forward to make a significant impact on the war.
In 1863-1865, there absolutely were enough slaves happy to fight for their freedom.

Perhaps we can attribute all these differences - except slavery - to the speed of secession in 1861.
After the American Revolution was won, John Adams expostulated that the real "American Revolution" wasn't the war, but the revolution "in the Minds and Hearts of the People", "effected before the War commenced". Months before war broke out, the First Continental Congress had met, and Committees of Correspondence were starting to govern throughout the colonies with popular support. If it hadn't been for this, there wouldn't have been those eager Patriots to restore American authority as soon as the British troops marched away.
One could point to some signs that the Confederacy had similar popular support among its white population - repeated agitation for secession, pro-slavery militias, the popular vote for secession conventions, and such. But, secession as such had been unpopular before 1861. And even then, a majority of delegates to the secession conventions had been elected on Unionist platforms4. The white people supported the slavery system, but that was different from secession.
Of course, a majority of Americans in mid-1775 - even a majority of Patriots - almost certainly opposed independence. But, this points to a difference in the starting war aims of America and the Confederacy. America, in 1775, was fighting for local control of local affairs and professing loyalty to the king. Patriots strongly supported that platform. Later in 1861, the Confederacy already had local control of local affairs (and a promise from President-Elect Lincoln to leave that alone), and was fighting for full independence.
If John Adams and Patrick Henry had declared independence in 1775, very few people would've followed them. If Jefferson Davis and Robert Rhett had planted their flag in 1861 on mere states' rights, everyone would've agreed (even Lincoln had publicly endorsed this position several times) and there would've been no need for a war. Or, if some other President had fought a war, this hypothetical Southern cause would've handily won a negotiated settlement.
This, then, was the first strategic mistake the Confederacy made in fighting what they termed the "Second American Revolution": they declared independence before the people were ready to support it.
The Confederacy in 1861, and the American Patriots in 1775, were fighting two very different wars. But most of those differences bottom out in popular support. The Patriots in 1775 had it firmly (for the cause for which they were fighting at the time, local control); the Confederacy in 1861 had it weakly-rooted from the beginning (for the cause they were fighting for, full independence) - even among their white population.
The Confederates' black population, of course, was solidly opposed5. As the Confederates recognized from the beginning, they were a strong strategic liability. They were also a huge moral liability for the Confederate cause, of course, but they didn't recognize that.
What made the Confederates rush to action here, I think, is the difference in their moral causes. The Fire-Eaters in 1860 pushed for quick secession because they knew that waiting would make their cause weaker. Time and civil service patronage would draw some Republican support even in the South, while people who might have been open to secession would turn against it on seeing Lincoln's rule was livable. The Patriots in the 1770's knew how to use time to solidify their cause; the Fire-Eaters in 1860 knew they couldn't.
And then, during the war, the moral force of the Patriots (founded on liberty) got stronger as it aged; the moral force of the Confederacy (founded on a wish to be left alone, and ideas of racial superiority) did not. At the start, neither had its people behind full independence - but one brought them there, and the other rushed to declare independence and then couldn't bring them behind it.
In the end, America won the Revolution, and the Confederacy lost the Civil War, because of how they were founded. This shows the Patriots' talent in the slow leadup to the American Revolutionary War. Without that, and then without the year between war and independence, they well might not have had that popular support - and the Civil War shows how that could've led to their collapse. But they waited, and that made all the difference.
For example, the Confederacy produced perhaps 250,000 tons of iron per year in 1861, against perhaps 30,000 tons/year for the thirteen colonies in 1776. On top of this, they had many things invented after 1775, such as railroads.
This wasn't literally true - some trained troops did stay behind the lines for garrison and supply duty. But conversely, some battalions recruited in the South joined the battle lines.
The British also sometimes tried to free slaves who would fight for them. But, it was only an occasional policy for them. The first to try it - Dunmore in 1775 Virginia - did get many volunteers. But, as I'll be writing about in more detail in several months, a combination of poor supplies, poor discipline, and a smallpox outbreak left his army to die or be recaptured. After that, further British attempts were delayed until 1779, and when they did happen didn't get many recruits.
One could say they abandoned their platforms in the conventions, or one could point to weasel words in their platforms and say events had changed since their election. Regardless, this demonstrates popular opposition to secession, even in 1861.
Some modern supporters of the Confederacy claim there were black men willingly fighting for the South. In reality, the Confederacy forbade black men to enlist until March 1865, a month before it lost the war, when - out of desperation - it organized two (segregated) companies who never saw actual battle. I personally suspect that, if they had seen battle, they would've deserted en masse.


A few comments and disagreements
1. "The Union also lost about a quarter of its Army of the Potomac at Gettysburg alone - yet no one considered negotiating then, while Yorktown was enough to force Britain to make peace."
Yep. Worth noting is that in the summer of 1863, the North had two other major field armies--the Army of the Tennessee, which had 70,000 men and was besieging Vicksburg, and the Army of the Cumberland, which had about 60,000 men and was maneuvering Braxton Bragg out of Tennessee.
2. "Almost every time, once the Union took land, it held that land."
Not quite true. Grant's men made several forays into central Mississippi and then withdrew, the units Sherman left behind in north Georgia to guard his supply lines during the Atlanta campaign were withdrawn, and when he marched through south Georgia, South Carolina, and North Carolina basically passed over the land and left nothing behind. Union forces also invaded southern Arkansas, but were forced to withdraw.
"To a large extent, the army that marched south into Tennessee could just keep marching south into Mississippi, because whole new regiments of US Colored Troops sprang up to garrison Tennessee behind them."
Not quite. USCT regiments don't start getting raised in that area until 1863, and the drive through West and Middle Tennessee and into Mississippi first happens in 1862. Now, USCT units do end up garrisoning the area in 1863 and 1864, along with white Tennessee regiments, but the initial occupation was by units raised in the North.
"The white people supported the slavery system, but that was different from secession."
That's a debatable proposition. Several states held referenda on secession once the conventions said they were for it, and the results were pretty striking. Texas voted 46,000 for, 15,000 against (https://www.tshaonline.org/texas-day-by-day/entry/588)--this was about the number of people who voted in the 1860 presidential election, and actually corresponds to the number of votes Breckinridge and Bell, respectively, got in the state.
Virginia voted (officially) about 125,000 for, 20,000 against, (https://archive.wvculture.org/history/statehood/statehood06.html)
and there are estimates that about 12,000 votes didn't get tallied, about 2,000 of which were for and 10,000 against.
"the Confederacy in 1861 had it weakly-rooted from the beginning (for the cause they were fighting for, full independence) - even among their white population."
This is a more accurate rendering of the matter--support for secession was broad, but shallow.
I live in Lawrence, Kansas, founded by New Englanders who wanted Kansas to be a free state, as it became. Down the road is LeCompton, Kansas, founded by supporters of slavery, who at one point undertook a murderous attack on Lawrence. These days, though, on the highway, there are signs that say "Come to LeCompton, where slavery began to die!" I suppose that technically that's true. . . .