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.,48 Ca+208 Pb,86 Kr+48 Ca/208 Pb/124 Sn,136 Xe+208 Pb,124 Sn+124 Sn, and136 Xe+136 Xe. A hard symmetry energy was available for creating the neutron-rich fragments, particularly in the medium-mass region. The isospin effect of the neutron-toproton(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.