Milk, owing to its nutritional value, is a staple commodity in daily life. Ensuring its integrity and authenticity is paramount for researchers and the food industry. To evaluate spoilage and adulteration of milk, we proposed a robust and reliable optical method to guarantee milk quality by utilizing riboflavin as an internal biomarker. By precisely controlling the content of Eu3+, Tb3+, and Gd3+ ions, a two‐dimensional ratiometric luminescence lanthanide coordination polymer (Ln‐CP) with adjustable emission centers was synthesized for the detection of riboflavin (RF), leveraging a Förster resonance energy transfer (FRET) and photoinduced electron transfer (PET) process. This method demonstrates high sensitivity and selectivity towards RF and has been successfully applied to the detection of RF in both milk and calf serum.