The synthesis of well-defined light-element-derived quantum dots (LEQDs) with advanced optical properties under mild conditions is highly desirable yet challenging. Here, a polyaniline (PANI) structure is introduced into carbon-rich LEQDs to yield well-defined, fluorescent polyaniline quantum dots (PAQDs), PAQD24, through a one-pot room temperature reaction. The mild synthetic conditions effectively minimize the defects introduced during the conventional synthesis and endow PAQD24 with desirable optical properties, including a narrow emission band (full width at half maximum = 55 nm), an optimal quantum yield of 32.5% and two-photon fluorescence. Furthermore, the bandgap of PAQD24 is highly sensitive toward pH variations in the near-neutral region, due to the proton doping and dedoping of the PANI structure. Such unique properties together with its fine bio-compatibility enable the application of this material as a turn-on fluorescent probe for the labeling of acidic biotargets from sub-cellular to organ levels, providing potential applications in diagnosis and surgery guidance for certain diseases.