Rambam's philosophical treatise dedicates its final chapter to free will, arguing that man's actions are in his own power, that no external compulsion determines his choices, and that this is why commandment, reward, and punishment are just.
ואתה דע, שדבר שהסכימו עליו תורתנו ופלספת יון, ואישרוהו מופתי האמת הוא, שמעשי האדם מסורים לו, אין כופה אותו בהם, ואין לא שום מניע לו מן החוץ, שיטהו למעלה או לפחיתות, חוץ מן ההכנה המיזגית בלבד, כפי שבארנו, שמקילה עליו דבר או מכבידה; אבל שיהיה מחויב או נמנע – לא. מכל מקום, אילו היה האדם אנוס במעשיו, היו בטלות מצוות עשה ולא תעשה שבתורה. והיה הכל הבל וריק, לאחר שאין בחירה לאדם במה שיעשה, וכן היה מתחייב ביטול הלימוד והחינוך והתלמדות כל אומנות. והיה כל זה לבטלה, לאחר שאי אפשר לאדם, מפני גורם חיצוני – לדעת הסוברים כך – שלא יעשה מעשה פלוני ושלא ידע חכמה פלונית ושלא יהיה לו אופי אלמוני. והיה אז הגמול והעונש עוול גמור, הן מאדם לחברו והן מן המקום לאדם: הרי שמעון זה שהרג לראובן: הואיל וזה נגזר עליו שיהרוג בעל כורחו, וזה נגזר עליו שייהרג בעל כורחו, לשם מה נעניש את שמעון? ואיך יתכן לו, יתברך, צדיק וישר, שיענישהו על מעשה, שאי אפשר לו שלא יעשהו, ואפילו השתדל שלא לעשותו, לא היה יכול. והיו גם בטלות ההכנות כולן עד סופן: כבניית הבית, וקניית המזון, וברוח בעת הפחד וכיוצא בזה. כי אשר נגזר שיהיה, אי אפשר שלא יהיה. וזה כולו שווא ושקר מוחלט, והוא כנגד המושכל והמורגש. ויש בו משום הריסת חומת הדת וטפול עוול על האלוהים, חס וחלילה. אולם אמת שאין לפקפק בה היא, שמעשי האדם כולם מסורים לו: אם ירצה – יעשה, ואם ירצה – לא יעשה. ואין מכריח ולא כופה אותו בזה, לפיכך הוא מצווה ועומד. ואמר: "ראה נתתי לפניך היום את החיים ואת הטוב [...] ובחרת בחיים" (דברים ל', ט"ו–י"ט), ונתן לנו הבחירה בזה. והטיל העונש על מי שימרה, והגמול על מי שיצית: אם שמוע תשמעו (שמות יט, ה), ואם לא תשמעו (ויקרא כו, יד). וחייב הלימוד וההתלמדות: וְלִמַּדתם אותם את בניכם (דברים יא, יט), וּלְמַדתם אותם ושמרתם לעשותם (שם ה, א), וכל מה שבא בלימוד והחינוך במצוות. וחייב גם כן ההכנות כולן, כמו שכתוב בתורת אמת: כי תבנה בית חדש ועשית מעקה לגגך, ולא תשים דמים בביתך (דברים כב, ח), פן ימות במלחמה (שם כ, ה), במה ישכב (שמות כב, כו), לא יחבול רחיים ורכב (דברים כד, ו); והרבה מאוד בתורה ובספרי הנביאים לעניין זה, רצוני לומר: ההכנות.
We, on the contrary, are convinced that our Law agrees with Greek philosophy, which substantiates with convincing proofs the contention that man's conduct is entirely in his own hands, that no compulsion is exerted, and that no external influence is brought to bear upon him that constrains him to be either virtuous or vicious, except inasmuch as, according to what we have said above, he may be by nature so constituted as to find it easy or hard, as the case may be, to do a certain thing; but that he must necessarily do, or refrain from doing, a certain thing is absolutely untrue. Were a man compelled to act according to the dictates of predestination, then the commands and prohibitions of the Law would become null and void, and the Law would be completely false, since man would have no freedom of choice in what he does. Moreover, it would be useless, in fact absolutely in vain, for man to study, to instruct, or attempt to learn an art, as it would be entirely impossible for him, on account of the external force compelling him, according to the opinion of those who hold this view, to keep from doing a certain act, from gaining certain knowledge, or from acquiring a certain characteristic. Reward and punishment, too, would be pure injustice, both as regards man towards man, and as between God and man. Suppose, under such conditions, that Simeon should kill Reuben. Why should the former be punished, seeing that he was constrained to do the killing, and Reuben was predestined to be slain? How could the Almighty, who is just and righteous, chastise Simeon for a deed which it was impossible for him to leave undone, and which, though he strove with all his might, he would be unable to avoid? If such were the true state of affairs, all precautionary measures, such as building houses, providing means of subsistence, fleeing when one fears danger, and so forth, would be absolutely useless, for that which is decreed beforehand must necessarily happen. This theory is, therefore, positively unsound, contrary to reason and common sense, subversive of the fundamental principles of religion, and attributes injustice to God (far be it from Him!). In reality, the undoubted truth of the matter is that man has full sway over all his actions. If he wishes to do a thing, he does it; if he does not wish to do it, he need not, without any external compulsion controlling him. Therefore, God very properly commanded man, saying, "See I have set before thee this day life and the good, death and evil .... therefore choose thou life", giving us, as regards these, freedom of choice. Consequently, punishment is inflicted upon those who disobey, and reward granted to the obedient, as it is said, "If thou wilt hearken", and "If thou wilt not hearken". Learning and teaching are also necessary, according to the commands, "Ye shall teach them to your children", "and ye shall do them and observe to do them", and, similarly, all the other passages referring to the study of the commandments. It is also necessary to take all the precautionary measures laid down in the Law, such as, "Thou shalt make a battlement for thy roof; that thou bring not blood upon thy house", "lest he die in the battle", "wherein shall he sleep?" , and "no man shall take to pledge the nether or the upper millstone", and many other passages in regard to precautions found in the Law and the Prophets.