In this paper, a total variation (TV) inpainting method is proposed for metal artifact reduction in medical computed tomography (CT). Digital inpainting is an image processing method to fill in the lost image information in a consistent way. In our work, projection data with metal projection region (MPR) are treated as a damaged image, and TV inpainting is applied to "inpaint" the information missing region. Compared to conventional interpolation methods, the advantage of our algorithm lies in dealing with complicate cases such as an image with multiple metal objects. In numerical experiments, both TV inpainting and linear interpolation method are performed on noise-free and additive noisy projection of a modified SheppLogan phantom. Results show that the algorithm proposed fills metal projection gaps more smoothly and accurately than linear interpolation, hence produces images of superior quality after reconstruction. Relevant practical issues including the limitation of the algorithm and possible impr vements for future work are discussed.