Parashas Vayeilech · Passuk 31:9
So Moses wrote down this Teaching and gave it to the priests, the sons of Levi, who carried the Ark of the LORD’s Covenant, and to all the elders of Israel.
Torah Temimah points to Gittin 59b (גיטין נ"ט ב').
English: The Sages enacted that the pit that is nearest to the irrigation channel that supplies water to several pits or fields is filled first on account of the ways of peace. They established a fixed order for the irrigation of fields, so that people would not quarrel over who is given precedence. Animals, birds, or fish that were caught in traps are not acquired by the one who set the traps until he actually takes possession of them. Nevertheless, if another person comes and takes them, it is considered robbery on account of the ways of peace. Rabbi Yosei says: This is full-fledged robbery. Similarly, a lost item found by a deaf-mute, an imbecile, or a minor is not acquired by him, since he lacks the legal competence to effect acquisition. Nevertheless, taking such an item from him is considered robbery on account of the ways of peace. Rabbi Yosei says: This is full-fledged robbery. If a poor person gleans olives at the top of an olive tree and olives fall to the ground under the tree, then taking those olives that are beneath it is considered robbery on account of the ways of peace. Rabbi Yosei says: This is full-fledged robbery. One does not protest against poor gentiles who come to take gleanings, forgotten sheaves, and the produce in the corner of the field, which is given to the poor [pe’a], although they are meant exclusively for the Jewish poor, on account of the ways of peace. GEMARA: The mishna teaches that at public readings of the Torah, a priest reads first, and after him a Levite. The Gemara asks: From where are these matters derived? What is the source of this halakha in the Torah? Rav Mattana said: As the verse states: “And Moses wrote this Torah, and delivered it to the priests, the sons of Levi” (Deuteronomy 31:9). The Gemara explains the inference: Is that to say I do not know that the priests are the sons of Levi? Why is it necessary for the verse to say this? Rather, the Torah was first delivered to the priests and afterward to the other Levites, and this serves as the source for the enactment that first a priest reads from the Torah, and after him a Levite. Rabbi Yitzḥak Nappaḥa said that this halakha is derived from here, as it is written: “And the priests, the sons of Levi, shall come near” (Deuteronomy 21:5). The Gemara asks: Is that to say I do not know that the priests are the sons of Levi? Rather, the Torah was first given to the priests and afterward to the other Levites, and from this we learn that first a priest reads from the Torah, and after him a Levite. Rav Ashi said that this halakha is derived from here: “The sons of Amram, Aaron and Moses; and Aaron was separated, that he should be sanctified as most holy” (I Chronicles 23:13).
Derash on the verse (Bavli sugya) — not a formal named middah of the 13
The Gemara uses this passuk inside a sugya (question, proof, or illustration). That is classical derash, but not labeled here as one of R' Yishmael’s 13 unless the move is explicit.
Writing and handing over the Torah is tied to the structure of authority and teaching: the Torah is given into responsible custody so it can be read and ruled from, not left as a private scroll only.