The presence of Total Polar Materials (TPM) in edible oils is a crucial indicator for assessing oil quality. It is of paramount importance to develop a rapid and dependable technique for monitoring polarity in frying oil. Sensitive polarity responsive fluorescence carbon dots (F-CDs) were synthesized by using p-phenylenediamine as precursors and 2-formylphenylboronic acid pinacol ester (2-FAPE) as a post-modifier. The construction of the fluorescent probe F-CDs involved a strong intramolecular charge-transfer (ICT) mechanism, with 2-FAPE serving as the electron-withdrawing fluorophore and the π-conjugated structure acting as a potent electron-donating group. A strong linear relationship was observed between the emission wavelength and the TPM value of frying oil within a range of 11% to 30%. Notably, the fluorescence color of the probe transitioned from blue to yellow under UV light at 365 nm as the TMP value increased. This study expands the range of sensing applications for CDs in food safety.