The gravity method is one of the non-destructive geophysical methods, which aims to estimate the 3D subsurface density distribution of geological bodies from the observed 2D surface gravity anomalies. Recently, deep learning has achieved great success in solving ill-posed problems including gravity inversion. The limitation of the current deep learning methods for gravity inversion is the difference between synthetic and field data. Thus, we introduce a self-supervised estimation method for 3D gravity inversion (SSGI). SSGI learns the field data directly by closed-loop of the inversion model and forward model. The proposed inversion model contains an encoder, an expander, a decoder, and a 3D refiner. Since the forward model is built according to the law of universal gravitation, SSGI can optimize the inversion model by minimizing the mean absolute error of the original and reconstructed gravity anomalies. Besides, SSGI constrains the inversion model by a guide-line in the auxiliary loop. Since the guide-line corresponds to the sampling or average of the density matrix, minimizing the mean absolute error between the original guide-line and the generated guide-line can reduce the uncertainty of inversion. The experimental results demonstrate that the proposed SSGI achieves state-of-the-art performance in 3D gravity inversion.