Disclosed is a method for training an artificial neural network capable of precision control of a magnetic robot. A method for gradually training an artificial neural network for controlling a magnetic robot, whereby the three-dimensional position of the magnetic robot is controlled, comprises: a primary training step in which a processor trains the artificial neural network to control the three-dimensional position of the magnetic robot in simulation environments; a secondary training step in which the processor additionally trains the artificial neural network to control the two-dimensional position of the magnetic robot in real-life environments after the primary training step; a tertiary training step in which the processor additionally trains the artificial neural network to control the three-dimensional position of the magnetic robot in real-life environments after the secondary training step; and a precision training step in which the processor additionally trains the artificial neural network to control the three-dimensional position of the magnetic robot in real-life environments having a preset restricted radius after the tertiary training step.