A quinoline-based fluorescent chemosensor was reported for the simultaneous detection of Zn2+ and Cd2+ in aqueous solution. In HEPES buffer, among various metal ions, only Zn2+ and Cd2+ exhibited fluorescence enhancement at 497nm accompanied by the red-shift emission wavelength. The mechanism was proposed that internal charge transfer effect induced by binding with Zn2+ or Cd2+ produced the fluorescence changes. With the addition of cysteine, the fluorescent solution containing sensor and Cd2+ show the decreased fluorescence at 497nm and the increased fluorescence at 420nm, which was attributed to the dissociation of the complex formed by sensor and Cd2+. In contrast, the fluorescence of solution containing sensor and Zn2+ is unchanged with the addition of Cys. Furthermore, the confocal microscopy experiments indicated that this sensor can provide real-time detection for intracellular Zn2+ and Cd2+.