One only has to read the articles of secession issued by the rebellious states to see that they seceded over slavery. They prclaimed it loudly and proudly when they seceded but adopted the “lost cause” myth after the war.
Lincoln freed the only slaves he could with the emancipation proclomation . The only way to end all slavery was a constitutional amendment. Lincoln emanciapted the slaves in the rebellious states under the theory that they were “contrabands” of war-that is they were engaged(unwillingly) in helping the rebellions cause and thus could be freed the same way Union Troops could seize goods being used to help with the rebellion. The name stuck-Blacks fighting for the union were often called "contrabands.
You are correct that the other purpose of the proclomation was to make the war about slavery. After the Proclomation the chance that Britain or any european power would recognize the xouth and join the war oin their side ended.