The Justice Department is investigating a sheriff in Central New York who released an undocumented man later taken into custody by federal agents.