This principle may seem self-evident, but many of those who attempted to compile lists of the 613 mitzvos before the Rambam apparently erred in this matter.
The Rambam cites the Talmud in Makkos (23b) that God communicated 613 mitzvos to Moshe at Sinai. It should go without saying that such later enactments as reading the Megillah on Purim and lighting the menorah on Chanukah could not be included, even though they are rabbinically considered “mitzvos” and we recite brachos on their performance. But, apparently, some people did reach that mistaken conclusion.
Maimonides speculates that the fact that we recite blessings on rabbinic “mitzvos” – including the text “Who sanctified us with His commandments and commanded us to…” – is what caused earlier compilers to err. However, he cites the Talmud in Shabbos (23a) and Chulin (106a), where it asks where, exactly, we were commanded to do such things. The answer is Deut. 17:11, which commands us to obey rabbinic enactments. So, reciting Hallel, washing our hands for bread, reading the Megillah, etc. are not mitzvos because the Torah specifies those things, they’re mitzvos because the Torah tells us to follow the rabbis on such matters.
To demonstrate the other side of the coin, the Rambam also cites Eruvin 21b, which explicitly states that washing for bread and the rules of eruv were instituted by King Solomon, ergo they were not commanded by God to Moshe at Sinai.
These things are rabbinic in nature even though they may have been instituted in “Bible times.” (Solomon lived in the time of the “early prophets” and the laws of Purim are explicit in the biblical Book of Esther.) However, some have erred and included laws or commands from other biblical books as mitzvos from the Torah. For example, Isaiah 58:7 is an exhortation to feed the hungry and clothe the naked. However, while doing so is no doubt a mitzvah, it is not its own mitzvah (and its source is certainly not from the books of the Prophets). Rather, to do these things is included in Deut. 15:8, a more general commandment for us to provide others with basic needs, be they what they may.
And so, despite the fact that some have erred, the Rambam debunks the misconception that later enactments might be included in the 613 mitzvos. Rather, all 613 are to be found within the Torah itself.