(Exodus 34:27:) "Write for yourself these words, [for according to the mouth of these words, etc.]." Rabbi Yochanan, Rabbi Yehoshua, and Rabbi Shimon say: "(I gave you) 'the words' is not written here, but rather 'according to the mouth of the words.' I gave you Written Torah and Oral Torah. If you made what is written into oral, and what is oral into written, and you exchanged them, you do not receive a reward. Why? Because I gave you Written Torah and Oral Torah, and I made a covenant with you on condition that you recite them in this way. But if you exchanged it, know that the covenant will be nullified, as it is said: 'Lest you forget the things that your eyes have seen' (Deuteronomy 4:9) — those that are written in writing; 'and lest they depart from your heart' (ibid.) — these are the oral ones."
Written and Oral Torah Sealed by Covenant at Sinai
Midrash Tanchuma Buber, Ki Tisa 18:1
כתב לך את הדברים האלה [כי על פי הדברים האלה וגו']. ר' יוחנן ור' יהושע ור' שמעון אומרים (נתתי לך) את הדברים אין כתיב כאן, אלא על פי הדברים, נתתי לך תורה שבכתב ותורה שבעל פה, אם עשית שבכתב על פה, ושבעל פה בכתב, והמרתה אותם אין אתה מקבל שכר, למה שנתת לך תורה שבכתב ותורה בעל פה, וכרתי עמך ברית, על מנת שתהא קורא בהם כן, אבל אם המרתה אותו, הוי יודע שתבטל הברית, שנאמר פן תשכח את הדברים אשר ראו עיניך (דברים יד ט), שהן כתובין בכתב, ופן יסורו מלבבך (שם), אלו שבעל פה.