Self-field effects, induced by charge and current densities of the electron beam, on gain in two-stage free-electron laser with nonuniform guide magnetic field is presented. The gain equation for small-signal has been derived analytically. The results of numerical calculations show a gain decrement for group I orbits and a gain enhancement for group II orbits, due to the self-field effects. The wiggler-induced self-magnetic field has a diamagnetic effect for group I orbits, whereas for group II, it has a paramagnetic effect. It is also found that using a nonuniform guide field, rather than a uniform one, causes the gain to increase.