Induction of muscle pain triggers a local immune response to produce pain and this mechanism may be sex and activity level dependent. The purpose of this study was to measure the immune system response in the muscle following induction of pain in sedentary and physically active mice. Muscle pain was produced via an activity-induced pain model using acidic saline combined with fatiguing muscle contractions. Prior to induction of muscle pain, mice (C57/BL6) were sedentary or physically active (24hr access to running wheel) for 8 weeks. The ipsilateral gastrocnemius was harvested 24hr after induction of muscle pain for RNA sequencing or flow cytometry. RNA sequencing revealed activation of several immune pathways in both sexes after induction of muscle pain, and these pathways were attenuated in physically active females. Uniquely in females, the antigen processing and presentation pathway with MHC II signaling was activated after induction of muscle pain; activation of this pathway was blocked by physical activity. Blockade of MHC II attenuated development of muscle hyperalgesia exclusively in females. Induction of muscle pain increased the number of macrophages and T-cells in the muscle in both sexes, measured by flow cytometry. In both sexes, the phenotype of macrophages shifted toward a pro-inflammatory state after induction of muscle pain in sedentary mice (M1+M1/2) but toward an anti-inflammatory state in physically active mice (M2+M0). Thus, induction of muscle pain activates the immune system with sex-specific differences in the transcriptome while physical activity attenuates immune response in females and alters macrophage phenotype in both sexes.