We demonstrate spatially resolved, coherent excitation of Rydberg atoms on an atom chip. Electromagnetically induced transparency (EIT) is used to investigate the properties of the Rydberg atoms near the gold-coated chip surface. We measure distance-dependent shifts (~10 MHz) of the Rydberg energy levels caused by a spatially inhomogeneous electric field. The measured field strength and distance dependence is in agreement with a simple model for the electric field produced by a localized patch of Rb adsorbates deposited on the chip surface during experiments. The EIT resonances remain narrow (<4 MHz) and the observed widths are independent of atom-surface distance down to ~20 μm, indicating relatively long lifetime of the Rydberg states. Our results open the way to studies of dipolar physics, collective excitations, quantum metrology, and quantum information processing involving interacting Rydberg excited atoms on atom chips.