CONVENTIONAL optical techniques for detecting companions to stars have been unable to confirm the existence of other planetary systems. This is because of the small angular separation (less than an arcsecond) and relative luminosity (~10-10 of any planet with respect to its parent star. As the velocity of the star due to the motion of a planet is likely to be only about one metre per second, detection through the Doppler shift of spectral lines in the stellar atmosphere is also impractical. Here we report observations which imply the existence of a planet-sized companion orbiting a neutron star, the pulsar PSR 1829-10, whose motion can be seen by Doppler effects on the observed arrival times of the pulses from the rotating neutron star. The planet is about 10 times the mass of the Earth, and is in an almost circular six-month orbit. It is not clear whether it formed in the aftermath of the supernova that created the neutron star, or was pre-existing and somehow survived through the late phases of stellar evolution and neutron-star formation. In either case, the existence of the planet challenges conventional theories of the formation of neutron stars from supernovae and has important implications for the existence of planetary systems around other stars.