Quantum sensing using the fluorescent nanodiamond (FND) nitrogen-vacancy center enables physical/chemical measurements of the microenvironment, although application of such measurements in living mammals poses significant challenges due to the unknown biodistribution and toxicity of FNDs, the limited penetration of visible light for quantum state manipulation/measurement, and interference from physiological motion. Here, we describe a microenvironmental thermometry technique using FNDs in rat mammary epithelium, an important model for mammary gland biology and breast cancer research. FNDs were injected directly into the mammary gland. Microscopic observation of mammary tissue sections showed that most FNDs remained in the mammary epithelium for at least 8 weeks. Pathological examination indicated no obvious change in tissue morphology, suggesting negligible toxicity. Optical excitation and detection were performed through a skin incision. Periodic movements due to respiration and heartbeat were mitigated by frequency filtering of the signal. Based on these methods, we successfully detected temperature elevation in the mammary epithelium associated with lipopolysaccharide-induced inflammation, demonstrating the sensitivity and relevance of the technique in biological contexts. This study lays the groundwork for expanding the applicability of quantum sensing in biomedical research, providing a tool for real-time monitoring of physiological and pathological processes.