The British emancipated Irish Catholics in 1825, and Blacks in 1831.
But they retained their slave empire in India for another century.
However, technically, you couldnt be charged with a crime of owning slaves in the UK until fairly recently - 1998 in fact. That's not to say slavery was legal, its just that if you were enslaving someone you would be charged with breach of other offences (kidnap, failing to pay minimum wages, assault etc).