When an amino acid-capped quantum dots solution meets 2,4,6-trinitrotoluene (TNT), it changes from colorless to red and its fluorescence is quenched. This is a recently developed technique for the detection of TNT in trace amount. However, what makes the changes in coloration and fluorescence remains controversial. Using density functional theory calculations, we studied the structures and optical properties of the products of TNT reacting with cysteine. Two compounds, namely Meisenheimer complex and TNT anion, which are respectively from an addition reaction and an acid-base reaction, were characterized, but neither of them can be used solely to interpret the experiments. Our calculations proposed the possibility of their coexistence in the solution from their similar thermodynamic stability, their predicted absorption and vibrational spectra. The superposition of their calculated optical absorption spectra produces band distributions similar to the experiments. Moreover, the measured Raman spectra that had ever been used to characterize the formation of Meisenheimer complex can not exclude the formation of TNT anion whose characteristic vibrations are buried by those of the former. Our calculations also revealed that in the Meisenheimer complex the electron delocalization in the phenyl ring of TNT is blocked by the attached cysteine, while in the TNT anion the removal of hydrogen atom enhances the electron delocalization and leads to a redshift of its first excitation in comparison with that of the Meisenheimer complex. Therefore, the key in the TNT detection is to control the QD size so as to adjust their emission at the wavelength around the absorption bands of either Meisenheimer complex or TNT anion that are formed with TNT and amino acid.