A federal judge on Friday ruled that Immigration and Customs Enforcement illegally detained a Chicago man whose teenage daughter is battling cancer.