Using first-principles calculations based on density functional theory and nonequilibrium Green's function formalism, we study the electron transport through a magnesium porphine molecule adsorbed on an ultrathin NaCl bilayer. The conductance of the tip−vacuum−molecule−NaCl−metal junction depends on the orientation of the molecule on the insulating surface and the tip position above the molecule, which is mediated largely by the molecular p z orbital. The movement of molecule results in a perturbation to the spatial extension of these orbitals, leading to different conductions. Article pubs.acs.org/JPCC