You are thinking of this from the point of view of a morally sound individual in the modern world.
It is always difficult to simply destroy your wealth after death. It would have been easier for him to Will all his slaves to whomever inherited the rest of his estate, or to simply sell them all before his death and give that money to causes he believed in (like setting up a university under his name).
No one at his time was going to criticize him. Heck other slave owners probably considered him too tender hearted for doing, what was in their minds the equivalent of releasing your prize horses into the wild to “run free” after you died.
https://en.wikipedia.org/wiki/Hercules_Posey
https://en.wikipedia.org/wiki/Oney_Judge
And he had no biological heirs which I can only imagine made it a breeze to not keep people in bondage.