Harnessing the power of low-dimensional materials in thermal applications calls for a solid understanding of the anomalous thermal properties of such systems. We analyze thermal conduction in one-dimensional systems by determining the frequency-dependent phonon mean free paths (MFPs) for an anharmonic chain, delivering insight into the diverging thermal conductivity observed in computer simulations. In our approach, the MFPs are extracted from the length dependence of the spectral heat current obtained from nonequilibrium molecular dynamics simulations. At low frequencies, the results reveal a power-law dependence of the MFPs on frequency, in agreement with the diverging conductivity and the recently determined equilibrium MFPs. At higher frequencies, however, the nonequilibrium MFPs consistently exceed the equilibrium MFPs, highlighting the differences between the two quantities. Exerting pressure on the chain is shown to suppress the mean free paths and to generate a weaker divergence of MFPs at low frequencies. The results deliver important insight into the anomalous thermal conduction in low-dimensional systems and also reveal differences between the MFPs obtained from equilibrium and nonequilibrium simulations.