A hydrogen molecule can diffuse freely on the surface and be trapped above an adsorbed molecule within the junction of a scanning tunneling microscope. The trapped dihydrogen exhibits the properties of a free rotor. Here we show that the intermolecular interaction between dihydrogen and Mg-porphyrin (MgP) can be visualized by imaging j=0 to 2 rotational excitation of dihydrogen. The interaction leads to a weakened H-H bond and modest electron donation from the dihydrogen to the lowest unoccupied molecular orbital of MgP, a process similarly observed for the interaction between dihydrogen and an adsorbed Au atom.