We report on spectral and timing observations of the nearest millisecond pulsar J0437–4715 with the Chandra X-ray Observatory . The pulsar spectrum , detected up to 7 keV , can not be described by a simple one-component model . We suggest that it consists of two components , a nonthermal power-law spectrum generated in the pulsar magnetosphere , with a photon index \gamma \approx 2 , and a thermal spectrum emitted by heated polar caps , with a temperature decreasing outwards from 2 MK to 0.5 MK . The lack of spectral features in the thermal component suggests that the neutron star surface is covered by a hydrogen ( or helium ) atmosphere . The timing analysis shows one X-ray pulse per period , with a pulsed fraction of about 40 % and the peak at the same pulse phase as the radio peak . No synchrotron pulsar-wind nebula is seen in X-rays .