The colonies did not revolt to preserve slavery...
...but it does need to be emphasized that there was a period where no doubt at least a few fence sitters, especially in the South, are likely to have become Patriots instead of Loyalists when the British offered freedom to any slave who escaped and would fight for them. And Johnson’s famous quote about the cries for slavery being loudest among the slave owners needs to be understood for its accuracy as much as its context.
The main cause was still a bad execution of a Tory government in London trying to tighten the economic reigns and establish its de jure supremacy over what had been a more de facto egalitarian economic relationship and autonomous local rule under Whig governments. The 13 colonies were more concerned with avoiding a political and economic fate similar to Ireland than anything else, and had already established an infrastructure and bureaucratic tradition that could not be replaced with Parliament-controlled rival without refusing the freedoms under which the colonies had grown in Whig rule.
The Tories honestly could have resolved a lot of their personal problems if they’d recognized the de facto landed aristocracy of the colonies as their peers; instead, they managed to antagonize the upper, middle, and lower class leaderships enough that it became a question of whether rule would come from home or abroad in the colonies, instead of a typical colony-mother country relationship (want the North Government wanted), or a peer-of-the-realm relationship (what Ben Franklin and others proposed in the colonies, and what would have required representation.)
The place of slavery in the situation is effectively the same as it was in the UK itself - slavers and nascent abolitionists were peers and business partners slowly turning towards the question. The difference was that the US had a larger slave population... and within a few decades would have the Cotton Gin make the cruel apathy of economics reinforce the dedication to it in the South. There’s a reason why Wilberforce and others ended slavery in the UK long before the US, but still took decades to do so.