We analyze motion of a fluxon in a weakly damped ac-driven long Josephson junction with a periodically modulated maximum Josephson current density. We demonstrate both analytically and numerically that a pure ac bias current can drive the fluxon at a resonant mean velocity determined by the driving frequency and the spatial period of the modulation, provided that the drive amplitude exceeds a certain threshold value. In the range of strongly “relativistic” mean velocities, the agreement between results of a numerical solution of the effective (ODE) fluxon equation of motion and analytical results obtained by means of the harmonic-balance analysis is fairly good; morever, a preliminary PDE result tends to confirm the validity of the collective-coordinate (PDE-ODE) reduction. At nonrelativistic mean velocities, the basin of attraction, in the position-velocity space, for phase-locked solutions becomes progressively smaller as the mean velocity is decreased.