In JFT-2M, the toroidal magnetic field (TF) ripple was reduced by ferritic insert. Two kinds of ripple reduction were carried out. In the first case, ferritic steel was installed between the TF coil (TFC) and the vacuum vessel, just under the TFCs outside the vacuum vessel. In the second one, ferritic steel was installed inside the vacuum vessel covering almost the whole inside wall. The ripple was successfully reduced in both cases. The temperature increment on the first wall, which indicates the ripple-induced loss of fast ions, was measured by infrared television and was also reduced. The effect of the localized larger ripple was also investigated by attaching additional ferritic steel. A new version of the orbit-following Monte Carlo (OFMC) code was developed including the three-dimensional complex structure of the TF ripple and the nonaxisymmetric first-wall geometry. The experimental results and the new OFMC calculation were consistent.