613. Write This Down: The obligation to write a Torah scroll
Write this song for yourselves… (Deuteronomy 31:19)
The last of the 613 mitzvos is the obligation for every man to write a sefer Torah. Recognizing that not every individual possesses the requisite skill to do so himself, one may employ another person to do so on his behalf. Nowadays, it's very common for people to sponsor letters, words or verses when their shul commissions a Torah scroll to be written. In this way, people can participate in the performance of this mitzvah.
The reason for this mitzvah is to help spread Torah. If everybody fulfilled this mitzvah, everyone would have a Torah - think how well-versed people could be! Our verse says, "Write for yourselves this song" - that is, the Torah - "and teach it to the children of Israel." It's not enough merely to write a Torah and leave it in a closet; it was meant to be taught!
A person is obligated in this mitzvah even if he inherited a sefer Torah from his father. While the mitzvah is specifically to write a Torah scroll, every person should strive to acquire and to study other books of Torah knowledge.
This mitzvah applies to men in all times and places. It is discussed in the Talmud in the tractates of Sanhedrin (21b), Baba Basra (13b-14b) and Menachos (30a-b). It is codified in the Shulchan Aruch in Yoreh Deah 274. This mitzvah is #18 of the 248 positive mitzvos in the Rambam’s Sefer HaMitzvos and #15 of the 77 positive mitzvos that can be observed today as listed in the Chofetz Chaim’s Sefer HaMitzvos HaKatzar.