The historian in me keeps wincing every time I hear well meaning Harry Potter podcasters critiquing the House Elf storyline and suggesting ways that she could have written in an end to slavery.
So far I've heard the gradual emancipation suggestion (i.e. everyone born after a certain date is free/everyone is free on a certain date) and the "fight in a war to gain freedom" suggestions.
Guys... both those things happened and neither worked out well for the slaves!
In the case of the last one it's two British women so I don't entirely blame them for not knowing this but for Americans I blame it on the fact that no one teaches northern slavery to students. The north are the good guys and therefore the abolishment of slavery in the north was an objective good.
Cliffnotes example: Slavery in New Jersey was done in the way described above, everyone born after a certain date is free and then all slaves were free after a later date. This was a model used for abolition in many northern states. In theory the law said that it was also illegal to export slaves out of state after the passage of the law. Except there was no enforcement mechanism for that and it happened right as the cotton gin was coming into wide spread use in the deep south. Because the trans Atlantis slave trade had ended there was a massive market increase in the need for slaves in the cotton states and there was a push and pull. Your slaves in New Jersey were essentially worthless in this period because they would be free soon and you could make a lot of money selling them in Georgia and Louisiana. As a consequence only a tiny fraction of slaves living in New Jersey when the abolition law was passed were ever freed and some of their children who were born free as a matter of law were shipped south with their parents to be enslaved when they landed in a slave state. The fact that this had the effect of not leaving a large free black population in the state was not an accident of this legislation. If the law makers had wanted to stop the export they would have written an enforcement mechanism in the 5 years that this took place. Now there were good men who tried to stop the export... but at least one of them was murdered on a boat on the Delaware river trying to stop it.
Fighting in a war for your freedom similarly went quite badly as British forces offered freedom to American slaves who fought against the revolutionary army. It was an effort to undermine the agricultural production of the American colonies and the slave owning class who were in general supporting the revolution. When the war ended many of those people were left high and dry by the British.