Yes, slavery was practiced throughout the colonies and on into the States.
However, slavery was much lower incidence outside the "deep South" (the States which became the Confederacy during the Civil War).
The Northern-most States (the Yankees) wanted to force the South to give up Slavery upon the founding of the USA, but did not have the economic power to do so at that time (hence, the "3/5ths compromise").
By the time of the Civil War, the Northern-most strip of States and California had already outlawed slavery and the North had expanded West to the Great Lakes, giving them the economic power to force the South to give up slavery.*
The South was economically devastated by being forced to give up slavery, taking over a hundred years to fully recover. The rest of the country was not economically devastated by the Civil War, because slavery was not a part of their success, and never had been.
The wealth that the few rich White slave-owners in the South made was not shared with the rest of White America, and was destroyed by the Civil War.
So why has the USA been so spectacularly successful? Mainly because of four factors:
1) majority White
2) the rule of law
3) massive amount of natural resources that had not previously been exploited
4) protected by two oceans, one on either side (before the jet age)
*[Note: the USA let the South secede peacefully, but said they would get their property. When the Confederacy attacked Fort Sumter, it galvanized the rest of the USA to fight.]