They aren't banning migrants from Chicago. They are banning Texas from dumping them at random without notice.
This is coming after an event where Texas told Chicago some migrants were coming, Chicago set up a drop off zone with resources and people set up to receive them, and then Texas deliberately dropped them off at the Chicago dump random points in the suburbs in freezing temperatures.