The mitzvah to write a Torah scroll
The mitzvah to write a Torah scroll () is the last mitzvah of the 613 Jewish commandments. It mandates Jews to write a Torah scroll for themselves. The source of the mitzvah is from what is said in Parashat Vayelech in Book of Deuteronomy: 

In the Oral Torah it is said that although according to the verse only the parasha "Hazinu" should be written, but since it is forbidden to write only one parsha from the Torah, necessarily the intention of the Torah in this mitzvah is to write the whole Torah. Purpose 
The mitzvah was given for two reasons, the first is that in writing the Torah in ink on the parchment there is a continuation of the tradition of Israel, and the passing on of the testimony of "the event of Mount Sinai". The second reason is so that Torah scrolls are in the hands of every person in Israel, and anyone who wants to study them will be able to do so. Laws 
Even a person who inherits a Torah scroll from their parents is obligated to also write one themselves. Anyone who does not know how to write a Torah scroll, or has difficulty writing it, can hire someone to write it for them, or otherwise buy a written Torah scroll. After finishing the writing, it is customary to bring the person into the synagogue in a big celebration, in a Torah scroll insertion ceremony. Possession of a Torah scroll 
Due to the high prices of Torah scrolls (typically over $10,000), it is difficult for many people to have a Torah scroll in their possession. Therefore, rabbis such as Moshe Feinstein ordered that anyone who does not have enough money is released from the mitzvah. Rabbi Moshe Feinstein rules that it is forbidden to spend more than a tenth of a person's fortune on this mitzvah as there may not be enough money left over for other mitzvahs. Women in the mitzvah 
There is a disagreement whether women are also included in this a mitzvah. In the Sefer ha-Chinuch, it is written that the obligation to write a Torah scroll is only for men, because they are obligated by the Talmud Torah mitzvah. However, The Shaagas Aryeh wrote that women are also obligated to write a Torah scroll, even though they are exempt from Talmud Torah as they are still obligated to study the practical laws and foundations of faith and morality. This is also the reason why they bless the Birkot HaTorah. In addition, in Shaagas Aryeh's opinion, the mitzvah does not depend on the Talmud Torah mitzvah at all, rather a mitzvah in itself that is directed towards all Jews, including women. Most of the latter Poskim rule that in principle women are exempt from the mitzvah of writing a Torah scroll, but if they wish to participate in financing a Torah scroll, a blessing will come upon them. In regarding the second part of the mitzvah which is the obligation to buy books for the purpose of Torah study, Rabbi Eliezer Melamed in the Peninei Halakha stated that women are obligated and that every woman is commanded to have basic books in halakha, the Bible, faith and morals. References

External links
 Rabbi Eliezer Melamed The Mitzvah to Write a Torah Scroll in Peninei Halakha in Hebrew
 The Mitzvah to Write a Torah Scroll by My Jewish Learning

Positive Mitzvoth
Torah