In this paper, we theoretically investigate how to control spin filtering via a [Formula: see text]-doping for electrons in a magnetically and electrically modulated semiconductor nanostructure (MEMSN), which can be realized by patterning a ferromagnetic (FM) stripe and a Schottky-metal (SM) stripe on top and bottom of GaAs/AlxGa[Formula: see text]As heterostructure in experiments, respectively. A considerable spin filtering effect still exists because of spin–orbit coupling (SOC), even if a [Formula: see text]-doping is included. Moreover, spin polarization ratio can be manipulated by [Formula: see text]-doping, which may lead to a structurally-controllable electron-spin filter for semiconductor spintronics.