There appears to be a contradiction in saying that rational beings have free will, but they are constrained by natural necessity. How can we really choose what actions we take if we are bound by our nature, and the laws of nature generally, to do certain things?
Kant argues that we can conceive of rational beings in two ways: as “an object affected through the senses” and as “an intelligence, that is, as independent of sensible impressions in the use of reason” (4:457). He creates a distinction between a “thing in appearance” and a “thing in itself” (4:457).
We are bound by nature in appearance. Our bodies are affected by laws of nature, and in this sense we are constrained by natural necessity. However, we are also an intelligence. As a “thing in itself,” we are thinking things, unbound by the necessity of nature.
This is how we can be both constrained and free. Insofar as we are a body in the sensible world, we are constrained by nature. But insofar as we are an intelligence, we have a free will that is unconstrained by nature.
Kant, Immanuel. Groundwork of the Metaphysics of Morals. Edited by Mary Gregor, Cambridge University Press, 1998. Online.