Kant's main idea, whatever sense can finally be made of it, depends on his fundamental two-worlds doctrine. He locates determinism in the empirical world or world of appearances, and freedom in the world of things-in-themselves, the world of reason. It is important that the latter world is not in time.
If, then, one wants to attribute freedom to a being whose existence is determined in time, one cannot, so far at least, except this being from the law of natural necessity as to all events in its existence and consequently as to its actions as well; for, that would be tantamount to handing it over to blind chance. But since this law unavoidably concerns all causality of things so far as their existence in time is determinable, if this were the way in which one had to represent also the existence of these things-in-themselves then freedom would have to be rejected as a null and impossible concept.