Just as coins have two sides, some things are both a positive mitzvah if one does A and a negative mitzvah if one does B. There are numerous examples: Refraining from labor on Shabbos is a positive mitzvah; performing labor violates a negative mitzvah. Letting the ground rest during Shemittah (the Sabbatical year) is a positive mitzvah; working the land violates a negative mitzvah. Fasting on Yom Kippur is a positive mitzvah; eating on that day violates a negative mitzvah. This is not self-evident: failing to give charity or to put on tefillin does not violate a negative mitzvah, it merely fails to fulfill a positive mitzvah. Similarly, one does not fulfill a positive mitzvah every time he refrains from committing murder (which, hopefully, is always), he merely violates a negative mitzvah for its transgression.
Another way we can get a positive-negative mitzvah combination is when the positive mitzvah precedes the negative, as in the case of the husband who slanders his new bride (Deut. chapter 22). It is a positive mitzvah for the man to remain married to her (“and she shall be a wife to him”) and a negative mitzvah to divorce her (“he may not send her away” – see verse 19).
The final way we can get a positive-negative mitzvah combo is when the negative mitzvah precedes the positive, as with the mitzvah of “shiluach hakan.” (Also in Deuteronomy chapter 22; what are the odds?) The Torah tells us that when one wants to take eggs or chicks from a bird’s nest, “do not take the mother with the young” (a negative mitzvah). Rather, “send the mother bird away” (a positive mitzvah – see verses 6-7).
The Rambam says that this principle is well established and that the Sages frequently refer to an action’s positive or negative mitzvah component (“asei sheba” and “lav sheba,” respectively). He doesn’t cite any examples, but you can check out Talmud Makkos 15b if you care to see one.
Finally, the Rambam typically cites examples where earlier codifiers erred in a principle and he often explains how they went astray. In this case, he says he doesn’t happen to know of any cases where others have gotten this principle wrong.