The self-focusing condition of a charged particle beam in a resistive plasma has been studied. When plasma heating is weak, the beam focusing is intensified by increasing the beam density or velocity. However, when plasma heating is strong, the beam focusing is only determined by the beam velocity. Especially, in weak heating conditions, the beam trends to be focused into the centre as a whole, and in strong heating conditions, a double-peak structure with a hollow centre is predicted to appear. Furthermore, it is found that the beam radius has a significant effect on focusing distance: a larger the beam radius will result in a longer focusing distance. Simulation results also show that when the beam radius is large enough, filamentation of the beam appears. Our results will serve as a reference for relevant beam–plasma experiments and theoretical analyses, such as heavy ion fusion and ion-beam-driven high energy density physics.