A Minnesota sheriff is being accused of unlawfully keeping a man in jail so immigration agents could come detain him.