The isospin effect in peripheral heavy-ion collisions was thoroughly investigated within the framework of the Lanzhou quantum molecular dynamics (LQMD) transport model. A coalescence approach was used to recognize the primary fragments formed in nucleus-nucleus collisions. The secondary decay process of these fragments was described using the statistical code GEMINI. The production mechanism and isospin effect of the projectile-like and target-like fragments were analyzed using the combined approach. It was found that the isospin migration from the high-isospin density to the low-density matter occurred in the neutron-rich nuclear reactions, i.e., 48Ca+208Pb, 86Kr+48Ca/208Pb/124Sn, 136Xe+208Pb, 124Sn+124Sn, and 136Xe+136Xe. A hard symmetry energy was available for creating the neutron-rich fragments, particularly in the medium-mass region. The isospin effect of the neutron-to-proton (n/p) ratio of the complex fragments was reduced when the secondary decay process was included. However, a soft symmetry energy enhanced the n/p ratio of the light particles, particularly at kinetic energies greater than 15 MeV/nucleon.