Older theories grounded duty in something outside you: reward, fear, God’s will, a moral feeling. Then duty is only a way to get something. Here the law comes from your own reason, and you are bound only by laws you give yourself that could hold for everyone. That is autonomy.
From Groundwork of the Metaphysics of Morals by Immanuel Kant