Mishneh Torah — Positive Mitzvot מצוות עשה, Chapter 17
The full Hebrew text of Mishneh Torah, Positive Mitzvot, Chapter 17, with English translation by Maimonides (Rambam).
לִכְתֹּב כָּל אִישׁ סֵפֶר תּוֹרָה לְעַצְמוֹ, שֶׁנֶּאֱמָר: "כִּתְבוּ לָכֶם אֶת הַשִּׁירָה הַזֹּאת" (דברים לא, יט).
For each man to write a Torah scroll for himself, as [Deuteronomy 31:19] states: "Write down this song."