The beams with phase gradients along the line trajectory, i.e., with the momentum flux transverse to the optical axis were generated with the beam shaping method and applied for optical manipulations in this paper. The phase distributions of the reconstructed beam in the focal plane of the objective and the moving velocity of the trapped microparticles were experimentally investigated. The experimental results showed that the moving velocity of the trapped microparticles is linearly dependent on the phase gradient possessed by the reconstructed beam. Furthermore, a generated curve beam was used to transport microparticles quickly and automatically along the curved route to avoid an obstacle. The generation method of the beams with phase gradients is simple. The beams would have potential applications in the fields such as optical trapping and optical sorting.