A simple and efficient method has been developed for the synthesis of fused pyrimidine derivative 5,6,7,8-tetrahydro-5-methyl-7-thioxopyrimido[4,5-d]pyrimidine-2,4(1H,3H)-dione (TMTPD) through Biginelli's one-pot multicomponent condensation reaction. The FT-IR and FT-Raman spectra were recorded to study the vibrations of the functional group presence. The UV–Visible spectrum also used to identify the electronic excitation from the ground state to excited state. Molecular structure of the synthesized compound has been studied using DFT/B3LYP/6-31G(d,p) level of theory. The Non-linear optical behaviour of the title compound was measured using first order hyperpolarizability calculation. The donor–acceptor stabilizing interactions have been analysed.