Mast cell degranulation impacts the development of pain and inflammation during tissue injury. We investigated the antinociceptive effect of a combination of cromoglycate and magnesium in the orofacial model of pain and the histological profile of the effect of magnesium in orofacial pain. In male Wistar rats, formalin (1.5%, 100 µL) was injected subcutaneously into the right upper lip of rats after cromoglycate and/or magnesium. Pain was measured as the total time spent on pain-related behavior. Toluidine blue staining was used to visualize mast cells under the light microscope. In the formalin test, in phase 1, magnesium antagonized the antinociceptive effect of cromoglycate, while in phase 2, it potentiated or inhibited its effect. Magnesium significantly reduced mast cell degranulation in the acute phase by about 23% and in the second phase by about 40%. Pearson’s coefficient did not show a significant correlation between mast cell degranulation and pain under treatment with magnesium. The cromoglycate-magnesium sulfate combination may prevent the development of inflammatory orofacial pain. The effect of a combination of cromoglycate-magnesium sulfate depends on the nature of the pain and the individual effects of the drugs. Magnesium reduced orofacial inflammation in the periphery, and this effect did not significantly contribute to its analgesic effect.