The magnetic properties of carbon nanotubes and their mechanical behaviour in a magnetic field have attracted considerable attention among the scientific and engineering communities. This paper reports an analytical approach to study the effect of a longitudinal magnetic field on the transverse vibration of a magnetically sensitive double-walled carbon nanotube (DWCNT). The study is based on nonlocal elasticity theory. Equivalent analytical nonlocal double-beam theory is utilised. Governing equations for nonlocal transverse vibration of the DWCNT under a longitudinal magnetic field are derived considering the Lorentz magnetic force obtained from Maxwell's relation. Numerical results from the model show that the longitudinal magnetic field increases the natural frequencies of the DWCNT. Both synchronous and asynchronous vibration phases of the tubes are studied in detail. Synchronous vibration phases of DWCNT are more affected by nonlocal effects than asynchronous vibration phases. The effects of a longitudinal magnetic field on higher natural frequencies are also presented. Vibration response of DWCNT with outer-wall stationary and single-walled carbon nanotube under the effect of longitudinal magnetic field are also discussed in the paper.