Slavery ended in the British Empire once Jamaica and Bardados became unimportant: trade competition with America, Industrial Revolution.
Slavery in America ended when economics of forced labor declined (but hastened 20 years by a civil war).