A significant fraction of the most massive stars move through space with a high velocity. One of the possible physical explanations is that a supernova in a compact binary system results in a high recoil velocity of the system. If the system remains bound, it can be subsequently observed as a spectroscopic binary (SB1), a high-mass X-ray binary, a compact binary, and finally a gravitational-wave event. If such a system is traced back to its parent cluster, binary evolution models can be tested in great detail. The Gaia proper motions and parallaxes are used to demonstrate that the high-mass X-ray binary HD153919/4U 1700-37 originates from NGC6231, the nucleus of the OB association Sco OB1. The O supergiant and its compact companion, of which the physical nature (a neutron star or a black hole) is unknown, move with a space velocity of 63 km/s with respect to NGC6231. The kinematical age of the system is 2.2 Myr. The parallaxes and accurate proper motions in Gaia DR2 were used to perform a membership analysis of NGC 6231. The distance to NGC6231 is 1.63 kpc. Isochrone fitting results in an age of 4.7 Myr. With the identification of NGC6231 as the parent cluster, the upper limit on the age of the progenitor of 4U1700-37 at the moment of the supernova explosion is 3.0 Myr. With these constraints, the evolutionary history of the system can be reconstructed with an initial mass of the progenitor of the compact object >60 Msun. Given its current high space velocity and the derived evolutionary history, the compact object in the system is more likely to have received a large natal kick, which suggests that it is more likely a neutron star than a black hole. HD153919/4U1700-37 might be a prototype in the Milky Way for the progenitor of gravitational wave events such as GW190412