Other way around.
Lee did not own the slaves. They were part of the GWP Custis estate for which he was the executor. The Custis will required the slaves to be given their freedom once the estate’s legacies and debts were paid off but no later than five years after his death.