In this study, 3,4-diaminobenzoic acid (DABA) was introduced into the porphyrin metal–organic framework (PCN-224) for the first time to prepare a ratiometric fluorescent probe (PCN-224-DABA) to quantitatively detect ferric iron (Fe(III)) and selenium (IV) (Se(IV)). The fluorescence attributed to the DABA of PCN-224-DABA at 345 nm can be selectively quenched by Fe(III) and Se(IV), but the fluorescence emission peak attributed to tetrakis (4-carboxyphenyl) porphyrin (TCPP) at 475 nm will not be disturbed. Therefore, the ratio of I345nm/I475nm with an excitation wavelength of 270 nm can be designed to determine Fe(III) and Se(IV). After the experimental parameters were systematically optimized, the developed method shows good selectivity and interference resistance for Fe(III) and Se(IV) detection, and has good linearity in the ranges of 0.01–4 μM and 0.01–15 μM for Fe(III) and Se(IV) with a limit of detection of 0.045 μM and 0.804 μM, respectively. Furthermore, the quenching pattern was investigated through the Stern–Volmer equation, and the results suggest that both Se(IV) and Fe(III) quenched on PCN-224-DABA can be attributed to the dynamic quenching. Finally, the constructed ratiometric fluorescent probe was applied in the spiked detection of lake water samples, which shows good applicability in real sample analysis. Moreover, the Fe(III) and Se(IV) contents in spinach and selenium-enriched rice were determined, respectively.