The directed movement of a nucleobase, any nitrogenous base that is a constituent of a nucleoside, nucleotide, or nucleic acid, into, out of or within a cell, or between cells, by means of some agent such as a transporter or pore.