Describing supernova explosions or neutron-star collisions requires a deep understanding of properties of nuclear matter at supra-saturation densities, and extreme neutron over proton asymmetries. So far, our knowledge about dense matter provided by astrophysical observations in the cores of neutron stars remains limited. However, dense nuclear matter is also probed in terrestrial heavy-ion collision (HIC) experiments. We demonstrate how, within a novel approach, using Bayesian inference, combining data from astrophysical multi-messenger observations of neutron stars and from HICs at relativistic energies, one can improve our understanding of dense nuclear matter. The inclusion of HIC data probing the nuclear matter equation-of-state (EoS) at supra-saturation density has the effect of increasing the predicted pressure in the core of neutron stars relative to previous analyses, and shifts the neutron-star radii expectation towards larger values, in accordance with recent observations by the Neutron Star Interior Composition Explorer mission. More remarkable is that, though the sources and methods of observation are orthogonal, the constraints from HIC experiments and multimessenger observations are consistent with each other. It shows that both methods can be complementary at intermediate densities, and strengthen each other. Another conclusion is that in order to be even more constraining, the constraint of the EoS of asymmetric nuclear matter by HIC methods should be improved above twice saturation density, which should be feasible with future experiments with enhanced precision and higher bombarding energy.