In this work, the vapochromic behavior of a mononuclear Pd(II) complex contains piroxicam ligands (trans-[Pd(Pir)2] where Pir− = piroxicam anion) is investigated in the presence of the vapor of twelve different solvents (H2O, CH3OH, CH3CH2OH, C6H5OH, CH2O, CH3CHO, CH3COCH3, DMF, CCl3H, CH3CN, CH3NO2, and DMSO), separately. For this purpose, the absorption spectrum of the complex when it is exposed to the vapor of each solvent is calculated using the time-dependent density functional theory (TD-DFT). The maximum number of vapor molecules which can be adsorbed by the complex is determined for each solvent. The interaction of the DMSO and C6H5OH molecules with the complex is stronger than that of the other solvent molecules. According to the calculated absorption spectra, the change of the color of the complex is observed for the vapors of the CH2O, CH3CHO, CH3COCH3, C6H5OH, and CH3NO2 solvents even in the presence of air humidity while the detection of the other solvent vapors is disturbed in the presence of water humidity. Based on the natural bonding orbital (NBO) calculations, the intra- and inter ligand π → π* transition is the main responsible for the color change of the complex in the presence of the selected solvent vapors. Also, the other electronic transitions such as π (ligand) → LP* (Pd), LP (Pd) → LP*(Pd), and the electron excitation from the π orbital of the adsorbed solvent molecules to the π* of the complex and vice versa, have some contributions in the color change of complex.