Metal effects on the gas sensing behavior of metal complexes of 5, 10, 15, 20-tetrakis(4-hydroxyphenyl) porphyrin (THPP) thin film was investigated in terms of detecting NO2 gas by the planar optical waveguide. For this purpose, several THPP and metal complexes were synthesized with different central metal ions: Co(II), Ni(II), Cu(II), and Zn(II). Planar optical gas sensors were fabricated with the metalloporphyrins deposited on K+ ion-exchanged soda-lime glass substrate with the spin coating method serving as host matrices for gas interaction. All of the THPP complex’s films were fully characterized by UV-Vis, IR and XPS spectroscopy, and the laser light source wavelength was selected at 520 and 670 nm. The results of the planar optical waveguide sensor show that the Zn–THPP complex exhibits the strongest response with the lowest detectable gas concentration of NO2 gas for both 520 nm and 670 nm. The Ni–THPP and Co–THPP complexes display good efficiency in the detection of NO2, while, on the other hand, Cu–THPP shows a very low interaction with NO2 gas, with only 50 ppm and 200 ppm detectable gas concentration for 520 nm and 670 nm, respectively. In addition, molecular dynamic simulations and quantum mechanical calculations were performed, proving to be coherent with the experimental results.