2-Amino-4-hydroxypteridine (pterin) and its derivatives serve as photooxidants and exhibit strong fluorescence. When they interact with hydrogen acceptors such as acetate and phosphate, their fluorescences are significantly quenched in acidic conditions (pH 4.9–5.5) but are retained in basic conditions (pH 10.0–10.5). This pH-related fluorescence quenching mechanism of pterin and its derivatives are fully investigated by using density functional theory (DFT) and time-dependent density functional theory (TD-DFT). Pterin and its derivatives are demonstrated to show favorable excited-state proton transfer (ESPT) abilities in acidic conditions that induce the experimentally observed fluorescence quenching. In contrast, the ESPT processes are found to be retarded due to the lack of strong hydrogen-bonding interactions in basic environments, which sustain their fluorescence. Interestingly, these ESPT processes are found to show different site specificities depending on the 6-site substituents. The introduction of electron-donating substituent activates the N1 site, making it the preferred ESPT site. By contrast, the introduction of an electron-withdrawing substituent activates the N5 site, making it the favorable ESPT site. The substitutions of different functional groups are found to affect the locations of acidic centers during the excitation and relaxation processes. This further affects the hydrogen-bonding patterns and ultimately brings site specificity to the ESPT process.