In Chagigah (18a), the Gemara brought several derivations that Chol HaMoed is forbidden for melakhah. And so too in Torat Kohanim, Parashat Emor, it is stated, and this is its wording: "And you shall do no melakhah" — this comes to teach regarding the days of the Moed that they are forbidden for melakhah. Might they be forbidden for "melakhet avodah"? The verse states "it" — it is forbidden for melakhet avodah, but the days of the Moed are not forbidden for melakhet avodah. And it is a printing error, and so it must be said: "It is an Atzeret, you shall do no melakhet avodah," for the verse "And you shall do no melakhah" was not written regarding the festivals. And this is the same derivation as in Chagigah, see there. And it derives from "it" — it is forbidden for melakhet avodah, meaning the Yom Tov itself, and not Chol HaMoed. For if not so, let it write "all melakhet avodah" regarding all seven days. And what is the matter of "melakhet avodah"? This refers to a davar ha'aved, meaning that the Torah permitted melakhet okhel nefesh on Yom Tov, but melakhet avodah at all — not at all, even a davar ha'aved. And even what is a need of Yom Tov, such as a garment to wear on Yom Tov is forbidden, or a house to dwell in is forbidden to build. And this is what is written, "You shall do no melakhet avodah." But on Chol HaMoed, there are those you are permitted to do, and there are those you are forbidden to do. And this is what they said in Chagigah ibid., that the verse handed them over to the sages. Meaning: since it is necessary that on Chol HaMoed there are forbidden melakhot and there are permitted melakhot, perforce it handed them over to the sages to understand the intent of the Torah, which it forbade and which it permitted.
בחגיגה (יח א) הביאו בגמרא כמה דרשות דחול המועד אסור במלאכה. וכן בתורת כהנים פרשת "אמור" איתא וזה לשונו: "וכל מלאכה לא תעשו" – הרי זה בא ללמד על ימי מועד שהם אסורים במלאכה. יכול יהו אסורים ב"מלאכת עבודה"? תלמוד לומר "הוא" – הוא אסור במלאכת עבודה, ואין ימי מועד אסורים במלאכת עבודה. וטעות הדפוס הוא וכן צריך לומר: "עצרת היא כל מלאכת עבֹדה לא תעשו", דקרא ד"כל מלאכה לא תעשו" לא נכתב ברגלים. וזהו עצמו הדרשא שבחגיגה, עיין שם. ודריש מ"היא" – היא אסורה במלאכת עבודה, כלומר יום טוב עצמו, ולא חול המועד. דאם לא כן ליכתב "כל מלאכת עבודה" אכל השבעת ימים. ומהו עניין ד"מלאכת עבודה"? זהו דבר האבד, כלומר דהתורה התירה מלאכת אוכל נפש ביום טוב, אבל מלאכת עבודה כלל – כלל לא, אפילו דבר האבד. ואפילו מה שצורך יום טוב, כגון בגד ללבוש ביום טוב דאסור, או בית לישב דאסור לבנות. וזהו דכתיב "כל מלאכת עבודה לא תעשו". אבל בחול המועד יש שאתה מותר לעשות, ויש שאתה אסור לעשות. וזהו שאמרו בחגיגה שם, שמסרן הכתוב לחכמים. כלומר: כיון שבהכרח שבחול המועד יש מלאכות אסורות ויש מלאכות מותרות, בעל כרחך שמסרן לחכמים להבין דעת התורה, איזה אסרה ואיזה התירה.