SUMMARY Magnetic susceptibility and natural remanent magnetization of rocks are useful parameters to study geological structures and geodynamic processes. Traditional widely used algorithms for the inversion of magnetic data can recover the distribution of the apparent susceptibility or total magnetization intensity, but do not provide information on the remanent magnetization. In this paper, we propose a framework to directly invert for the magnetic susceptibility and the natural remanent magnetization vector using surface or airborne magnetic data, assuming that the Köenigsberger ratio of the rock is known or approximately deducible. The susceptibility and remanence are computed using two different approaches: (1) the susceptibility, intensity, and direction of the remanent magnetization are continuously recovered for each discretized cell and (2) the remanence direction is assumed to be uniform in each subzone and is iteratively computed as discrete values. Both processes are implemented using the preconditioned conjugate gradient algorithm. The method is tested on three synthetic models and one field data set from the Zaohuohexi iron-ore deposit, Qinghai Province, northwest China. The results of the continuous inversion show the trend of the remanent magnetization directions, while the discrete inversion yields more specific values. This inversion framework can determine the source bodies’ geometry and position, and also provide superposed and comprehensive information on the natural remanent magnetization, which may be useful to investigate geological bodies bearing stable primary remanent magnetization.