  Using observations of X-ray pulsar Her X-1 by the Imaging X-ray Polarimetry
Explorer, we report on a highly significant ($>17\sigma$) detection of the
polarization signal from an accreting neutron star. The observed degree of the
linear polarization of $\sim$10\% is found to be far below theoretical
expectations for this object, and stays low throughout the spin cycle of the
pulsar. Both the polarization degree and the angle exhibit variability with
pulse phase, which allowed us to measure the pulsar spin position angle 57(2)
deg and the magnetic obliquity 12(4) deg, which is an essential step towards
detailed modelling of the intrinsic emission of X-ray pulsars. Combining our
results with the optical polarimetric data, we find that the spin axis of the
neutron star and the angular momentum of the binary orbit are misaligned by at
least $\sim$20 deg, which is a strong argument in support of the models
explaining stability of the observed super-orbital variability with the
precession of the neutron star.
