We propose an electrically driven spin injector into normal metals and semiconductors, which is based on a magnetic tunnel junction (MTJ) subjected to a microwave voltage. Efficient functioning of such an injector is provided by electrically induced magnetization precession in the "free" layer of MTJ, which generates the spin pumping into a metallic or semiconducting overlayer. To validate the feasibility of the proposed device, we theoretically describe the spin and charge dynamics in the CoFeB/MgO/CoFeB/Au and CoFeB/MgO/CoFeB/GaAs tunneling heterostructures. First, the magnetization dynamics in the free CoFeB layer is quantified with the account of a spin-transfer torque generated by the spin-polarized current flowing through the MTJ and a voltagecontrolled magnetic anisotropy associated with the CoFeB|MgO interface. The calculations are performed in the macrospin approximation for an ultrathin CoFeB layer with perpendicular anisotropy and nanoscale in-plane dimensions. By numerically solving the Landau-Lifshitz-Gilbert-Slonczewski equation, we determine dependences of the precession amplitude on the frequency f and magnitude Vmax of the ac voltage applied to the MTJ. It is found that the frequency dependence changes drastically above the threshold amplitude Vmax ≈ 200 mV, exhibiting a break at the resonance frequency fres due to nonlinear effects. The results obtained for the magnetization dynamics are then used to describe the spin injection and pumping into the Au and GaAs overlayers. The total spin-current density near the interface is calculated as a function of time at different excitation frequencies and voltage amplitudes. Since the generated spin current creates additional charge current owing to the inverse spin Hall effect, we also calculate distributions of the charge-current density and electric potential in the thick Au overlayer. The calculations show that the arising transverse voltage, which can be used to probe the efficiency of spin generation electrically, becomes experimentally measurable at f = fres. Finally, we evaluate the spin accumulation in a long n + -GaAs bar coupled to the MTJ and determine its temporal variation and spatial distribution along the bar. It is found that the ac spin accumulation under resonant excitation is large enough for experimental detection via a voltage between two ferromagnetic nanocontacts even at micrometer distances from the MTJ. This result demonstrates high efficiency of the described nanoscale spin injector driven by microwave voltage.