Stimuli-responsive materials with donor-acceptor (D-A) systems have significant potential for sensing toxic analytes in solution and solid state. In this regard, a new probe, N, N-dimethyl-4-(4-phenylquinazolin-2-yl) aniline (DAQ), was synthesized using microwave irradiation and characterized using various spectroscopic techniques. The crystal structure analysis revealed that DAQ crystallized in a monoclinic system with a P21/m space group. The probe exhibits fluorescence properties in solid state and solution, with positive solvatochromism observed as solvent polarity increased from hexane to DMF, indicating the existence of D-A structural units. The probe DAQ, exhibited reversible switching behaviour in the solution and solid state, indicating its sensitivity to volatile trifluoroacetic acid (TFA) and triethylamine (TEA) as confirmed by spectrophotometric and spectrofluorimetric studies. The binding constant of probe DAQ with TFA and TEA were studied by the Benesi Hildebrand (BH) plot using UV-Vis spectral titration. The estimated association constant was found to be 1.43 × 10