Two types of supernova are thought to produce the overwhelming majority of neutron stars in the Universe. The first type, iron-core collapse supernovae, occurs when a high-mass star develops a degenerate iron core that exceeds the Chandrasekhar limit. The second type, electron-capture supernovae, is associated with the collapse of a lower-mass oxygen-neon-magnesium core as it loses pressure support owing to the sudden capture of electrons by neon and/or magnesium nuclei. It has hitherto been impossible to identify the two distinct families of neutron stars produced in these formation channels. Here we report that a large, well-known class of neutron-star-hosting X-ray pulsars is actually composed of two distinct sub-populations with different characteristic spin periods, orbital periods and orbital eccentricities. This class, the Be/X-ray binaries, contains neutron stars that accrete material from a more massive companion star. The two sub-populations are most probably associated with the two distinct types of neutron-star-forming supernovae, with electron-capture supernovae preferentially producing system with short spin period, short orbital periods and low eccentricity. Intriguingly, the split between the two sub-populations is clearest in the distribution of the logarithm of spin period, a result that had not been predicted and which still remains to be explained.