Compound of 3,3'-(4-(2-amino-4,5-dimethoxyphenyl)pyridine-2,6-diyl)dianiline (CHP) has been synthesized via three-step synthetic procedure from veratraldehyde as starting material and 4-(4,5-dimethoxy-2-nitrophenyl)-2,6-bis(3-nitrophenyl)pyridine (CHP-1) as an intermediate compound. The CHP-1 was reduced using hydrazine hydrate catalyzed by 10% Pd/C to the final target of CHP. The spectroscopic study revealed that CHP in acetonitrile could detect formaldehyde through fluorescence enhancement and showed color change from yellow to blue under the 365 nm portable ultraviolet lamp as a response. Based on the fluorescence spectra, the emission wavelength of CHP in acetonitrile was shifted from 526 to 480 nm after addition of formaldehyde. Limit detection (LOD), selectivity, sensitivity, and computational study geometry of CHP as a chemosensor for formaldehyde has also been investigated. CHP could also be applied as a test paper for the detection of formaldehyde qualitatively.