When the Rabbis stated that obedience or disobedience to the commandments depends not on the will of Hashem but on man’s free will, they echoed Jeremiah, who said, “Out of the mouth of the Most High there comes neither the bad nor the good” (Lamentations 3:38). By the bad he meant vice, and by the good he intended virtue, meaning that Hashem does not predetermine any person as bad or good. Since this is so, a person owes it to himself to mourn his sins and transgressions, since he has committed them of his own free will, as Jeremiah says, “For what should a living man mourn? Let every man mourn because of his sins” (Lamentations 3:39). Jeremiah answers his question positively, telling us that the remedy for our disease lies with us. Just as our failings stemmed from our own free will, so do we have the power to repent of our evil deeds.
Maimonides, Rambam: Shemonah Perakim, The Eight Chapters; Maimonides' Introduction to Ethics of the Fathers; Perek Chelek; Discourse on the World to Come
free-will