Nonlocally coupled oscillators with a phase lag self-organize into various patterns, such as global synchronization, the twisted state, and the chimera state. In this paper, we consider nonlocally coupled oscillators that move on a ring by randomly exchanging their positions with the neighbors and investigate the combined effects of phase lag and mobility on the collective phase dynamics. Spanning the whole range of phase lag and mobility, we show that mobility promotes synchronization for an attractive coupling, whereas it destroys coherence for a repulsive coupling. The transition behaviors are discussed in terms of the timescales of synchronization and diffusion of the oscillators. We also find a novel spatiotemporal pattern at the border between coherent and incoherent states.