In the present work we investigate the link between high-mass X-ray binaries (HMXBs) and star formation in the Large Magellanic Cloud (LMC), our nearest star-forming galaxy. Using optical photometric data, we identify the most likely counterpart of 44 X-ray sources. Among the 40 HMXBs classified in this work, we find 33 Be/X-ray binaries, and 4 supergiant XRBs. Using this census and the published spatially resolved star-formation history map of the LMC, we find that the HMXBs (and as expected the X-ray pulsars) are present in regions with starformation bursts ∼6-25 Myr ago, in contrast to the Small Magellanic Cloud (SMC), for which this population peaks at later ages (∼25-60 Myr ago). We also estimate the HMXB production rate to be equal to 1 system per ∼ 43.5 × 10 −3 M yr −1 or 1 system per ∼143 M of stars formed during the associated star-formation episode. Therefore, the formation efficiency of HMXBs in the LMC is ∼17 times lower than that in the SMC. We attribute this difference primarily in the different ages and metallicity of the HMXB populations in the two galaxies. We also set limits on the kicks imparted on the neutron star during the supernova explosion. We find that the time elapsed since the supernova kick is ∼3 times shorter in the LMC than the SMC. This in combination with the average offsets of the HMXBs from their nearest star clusters results in ∼4 times faster transverse velocities for HMXBs in the LMC than in the SMC.