We have developed an inversion approach that estimates the basement relief of a fault-bounded sedimentary basin. The sedimentary pack is approximated by a grid of 3D or 2D vertical prisms juxtaposed in the horizontal directions of a right-handed coordinate system. The prisms’ thicknesses represent the depths to the basement and are the parameters to be estimated from the gravity data. To obtain depth-to-basement estimates, we introduce the total variation (TV) regularization as a stabilizing function. This approach lets us estimate a nonsmooth basement relief because it does not penalize sharp features of the solution. We have deduced a compact matrix form of the gradient vector and the Hessian matrix of the approximation to the TV function that allows a regularized Gauss-Newton minimization approach. Because the Hessian matrix of the approximation to the TV function is ill conditioned, we have modified this Hessian matrix to improve its condition and to accelerate the convergence of the Gauss-Newton algorithm. Tests conducted with synthetic data show that the inversion method can delineate discontinuous basements presenting large slips or sequences of small-slip step faults. Tests on field data from the Almada Basin, Brazil, and from the San Jacinto Graben, California, U.S.A., confirm the potential of the method in detecting and locating in-depth normal faults in the basement relief of a sedimentary basin.