A major challenge in medicine is developing potent pain therapies without the adverse effects of opiates. Neuroinflammation and in particular microglial activation have been shown to contribute to these effects. However, the implication of the microglial mu opioid receptor (MOR) is not known. We developed a novel conditional knockout (cKO) mouse line, wherein MOR is deleted in microglia. Morphine analgesic tolerance was delayed in both sexes in cKO mice in the hot plate assay. Opioid-induced hyperalgesia (OIH) as measured in the tail immersion assay was abolished in male cKO mice, and physical dependence to morphine as assessed by naloxone-induced withdrawal was attenuated in female cKO mice. Our results show a sex-dependent contribution of microglial MOR in morphine analgesic tolerance, OIH, and physical dependence. In conclusion, our data suggest that blockade of microglial MOR could represent a therapeutic target for opiate analgesia without the opiate adverse effects.