Wavefield separation is important for eliminating unwanted components of seismic data while retaining preferred components therein; however, there have been difficulties with using traditional methods to select a proper muting window in the transformed domain. A narrow muting window can separate different components well, but it causes visible artifacts due to sudden truncations (e.g., the Gibbs phenomenon), whereas a wide muting window would, on the other hand, leave unwanted components. We have adopted separating the wavefield based on its irreversibility after migration and demigration. One-way wave-equation migration would automatically damp high-slope components in the evanescent region while accurately handling the other components. Thus, the migration velocity can be tuned to naturally trap a given range of high-slope components into the evanescent region in the migrated domain, which would be irreversible after demigration. In contrast, the other components (i.e., those outside the evanescent region) can be recovered after demigration. Our method achieves perfect muting by taking advantage of migration and demigration, and thus it avoids the manual operation of setting a muting window. As a result, our method is free of muting artifacts. We conduct numerical experiments with synthetic and field data, and the results verify the excellent performance of our method for several different kinds of wavefield separation, including linear event separation, structural noise elimination, diffraction-reflection separation, and vertical seismic profile wavefield separation. Our method integrates noise reduction and the wavefield separation, and thus it can reduce the computational cost of using different data processing schemes and avoid the related potential error accumulation.