We present a theoretical study on the spin-dependent Goos–Hänchen (GH) effect in a two-dimensional electron gas modulated by ferromagnetic and Schottky metal (SM) stripes. The GH shifts for spin electron beams across this device are calculated with the help of the stationary phase method. It is shown that the GH shift of spin-up beam is significantly different from that of spin-down beam, i.e., this device shows up a considerable spin polarization effect in GH shifts of electron beams. It also is shown that both magnitude and sign of spin polarization of GH shifts are closely related to the stripe width, the magnetic strength and the gated voltage under SM stripe. These interesting properties not only provide an effective method of spin injection for spintronics application, but also give rise to a tunable spin beam splitter.