An analytical solution for the 2D distribution of the electric potential in MHD flow in a nonuniform magnetic field produced by rectilinear current is obtained. Analytical equations for the current density and the Lorentz force in the locally ionized MHD flow are obtained. It is shown that the Lorentz force distribution and thus the MHD effect on the flow significantly depend on the electric field imposed. The supersonic locally ionized MHD flow over a flat plate is calculated under different conditions. It is shown that the MHD effect allows one to significantly modify the flow pattern and the surface pressure distribution along the plate.