Heavy fermion superconductors offer an ideal setting for exploring mechanisms of unconventional superconductivity, as their superconducting pairing is generally believed to originate from magnetic fluctuations. Inelastic neutron scattering (INS) enables the detection of magnetic fluctuations in momentum-energy space, thus playing an irreplaceable role in measuring magnetic excitations in heavy fermion superconductors and in understanding their superconducting mechanisms. This article reviews neutron scattering studies on two archetypal Ce-based heavy fermion superconductors—CeCoIn
5 (T
c ≈ 2.3 K) and CeCu
2Si
2 (T
c ≈ 0.6 K). Both compounds have been investigated with high-resolution triple-axis and time-of-flight spectrometers, using polarized neutrons and applied magnetic fields, which together resolve how their magnetic excitations evolve with temperature, momentum, energy, magnetic field and chemical substitution. In CeCoIn
5, magnetic excitations exhibit a prominent spin resonance mode at E
r ≈ 0.6 meV (≈ 3k
BT
c) in the superconducting state, the upward dispersion of which defies a spin-exciton description in the weak-coupling limit and instead closely resembles that of the spin waves in the antiferromagnetically ordered CeRhIn
5. The spin resonance mode in CeCoIn
5 exhibits an Ising anisotropy, a double splitting under applied magnetic field, and a deviation from the Néel wave vector at low energies, suggesting that this mode is closely related to the field-induced Q-phase. Chemical substitution reveals that E
r and T
c decrease in tandem upon La or Yb substitution while E
r/k
BT
c stays nearly constant, whereas hole doping with Hg, Cd or Zn induces commensurate antiferromagnetic order and removes the spin resonance mode. CeCu
2Si
2 is naturally proximate to a magnetic quantum critical point, and its normal-state magnetic excitations exhibit the E/T
3/2 scaling expected for an itinerant three-dimensional spin-density-wave quantum critical point. A spin resonance mode at E
r ≈ 0.2 meV (≈ 4k
BT
c) develops in the superconducting state, providing crucial evidence for unconventional superconducting pairing. In contrast to the low-energy excitations that show significant dispersion, the momentum dependence of the high-energy magnetic excitations in CeCu
2Si
2 does not vary significantly with energy, suggesting that they may originate from scattering between the heavy fermion states and conduction-electron states. The reviewed neutron scattering studies on CeCoIn
5 and CeCu
2Si
2 reveal that these systems host versatile ground states and readily tunable magnetic excitations, providing key insights into the mechanisms of unconventional superconductivity.