Here is a previous /r/askhistorians posts with answers to this question.
Also, for a famous example, 15th President of the US James Buchanan did this. Though he did so to maintain his image of being neutral on the issue after discovering family members were slave owners.