Magnetars form a special population of neutron stars with strong magnetic fields and long spin periods. About 30 magnetars and magnetar candidates known currently are probably isolated, but the possibility that magnetars are in binaries has not been excluded. In this work, we perform spin evolution of neutron stars with different magnetic fields in wind-fed high-mass X-ray binaries and compare the spin period distribution with observations, aiming to find magnetars in binaries. Our simulation shows that some of the neutron stars, which have long spin periods or are in widely-separated systems, need strong magnetic fields to explain their spin evolution. This implies that there are probably magnetars in high-mass X-ray binaries. Moreover, this can further provide a theoretical basis for some unclear astronomical phenomena, such as the possible origin of periodic fast radio bursts from magnetars in binary systems.