In this work, the complete structural, vibrational, electronic, and spectroscopic properties (1H, 13C NMR, UV–vis) and, natural bond orbital (NBO), Frontier molecular orbital (FMO) analysis of ethyl,1-methyl-4-phenylpiperidine-4-carboxylate (pethidine) and 2-(2-((2,6-dichlorophenyl)amino)phenyl)acetic acid (diclofenac) drugs were investigated in the gas and liquid phases by using the density functional theory (DFT/B3PW91) method and DGDZVP level of theory. Moreover, CIS-DGDZVP was used to calculate the energy and wavelength absorption (λmax) of electronic transitions and its nature within the pethidine and diclofenac drugs. Therefore, for further analysis of these drugs, the effects of solvents on UV-vis and NMR spectra were investigated. The results revealed that the polarity of the solvents plays a crucial role in the structure and properties of the pethidine and diclofenac drugs. The 1H and 13C NMR spectra, NBO, the amount of global hardness, softness, ionization energy, electron affinity energy, the highest occupied molecular orbital (HOMO), lowest unoccupied molecular orbital (LUMO), Frontier molecular orbitals analysis, hybridization, zero-point energy (ZPE), total energy (ET), Dipole Moment (m), polarizability (α), MEP, bond lengths, bond angles, and electro negativity were calculated in the gas and liquid phases. 3D-plots of the molecular electrostatic potential (MESP) for the studied compounds were investigated and analyzed to assess the distribution of electronic density of orbitals and nucleophilic sites of the selected molecules. The results of the spectra showed that the solvents had greater effects on pethidine. Nevertheless, as for CH3OH solvent, the zero-point energy equals to 0.344085, the total energy equal to 226.673 kcal/mol and dipole moment equal to 2.520 a.u were produced.