The absorption lines with high blue-shifted velocities are frequently found in the ultraviolet (UV) and X-ray spectra of luminous active galactic nuclei (AGNs). This implies that the high-velocity winds/outflows are common in AGNs. In order to study the formation of high-velocity winds, especially ultra-fast outflows (UFOs), we perform two-dimensional magnetohydrodynamic (MHD) simulations. Initially, a magnetic field is set to be weaker than the gas pressure at disk surface. In our simulations, line force operates on the region like filaments, because the X-ray radiation from corona is shielded by dense gas in the inner region at some angle. The location of filaments changes with time and then the line-driven winds are in exposure to X ray and become highly ionized. Line force at UV bands does not directly drive the highly-ionized winds. In the sense of time average, the properties of high-velocity winds meet the formation condition of UFOs. Compared with line force, the function of magnetic field is negligible in directly driving winds. In the MHD model, the region around the rotational axis becomes magnetic-pressure-dominated, which prevents gases from spreading to higher latitudes and then enhances the gas column density at middle and low latitudes (20 o -70 o ). Higher column density is helpful to shield X-ray photons, which causes that line force is more effective in the MHD model than in the HD model. Higher-velocity winds with broader opening angle are produced in the MHD model.