This review focuses on the demonstration of an interrelation between various in-medium effects, which are manifested in the phenomena occurring in neutron stars and heavy-ion collisions. More specifically, the equation of state of a baryon-rich cold hadron matter is considered. It is done within the relativistic mean-field approach with σ field-scaled hadron masses and couplings, and a cut-mechanism is discussed leading to an increase of the stiffness of the dense baryon matter. Then, I discuss the role of the viscosity and thermal conductivity in description of the first-order phase transitions occurring in heavy-ion collisions and neutron stars. Next, the p-wave polarization effects on pion and kaon spectra are studied beyond the mean-field level. In particular, the pion softening effect is detailed. Then, a role of in-medium effects in neutrino radiation of neutron stars is discussed and effects of the bulk and shear viscosities in the problem of r-mode damping in young rapidly rotating pulsars are considered.