Cone-beam CT systems are widely used because of their high flexibility with respect to patient position and scan trajectory. In the last years, C-arm CT systems have been used to acquire images in weight-bearing conditions in order to expose, e.g. the knee joint under realistic loads. Straight standing or squatting patient positions lead to involuntary patient motion during the acquisition. In this paper, a fully-automatic motion estimation and compensation framework to mitigate knee-joint motion during weight-bearing C-arm scans is presented. Our framework consists of three major steps: marker detection with outlier removal, motion estimation and correction, and marker removal. The marker detection is based on an initial estimate of the marker position extracted from the motion-blurred filtered backprojection (FDK) reconstruction and on the fast radial symmetry transformed (FRST) 2-D projection images. The motion is estimated by the alignment of the forward projected 3-D initial marker positions with the actual detected 2-D marker positions. The motion is then corrected in the filtered backprojection step. Finally, the detected markers are removed in the 2-D projection images by simple interpolation. The framework was evaluated on three C-arm CT datasets from one volunteer in a straight standing, moderate squatted and deep squatted position. All 3-D reconstructions show a large improvement in image quality compared to the non-corrected 3-D reconstructions.