TomoTherapy delivery is controlled by a planned, projection-wised leaf sequence (sinogram) that is optimized during treatment planning. In this paper, we developed a software solution for real-time motion compensation that delivers helical TomoTherapy plans without modifying the hardware and workflow of the TomoTherapy delivery system. Unlike the dynamic MLCbased method, our technique only requires instantaneous tumor positions, which greatly simplifies its implementation. This technique re-uses the planned sinogram by shuffling its projections and leaf sequences. In order to compensate for longitudinal tumor motion in real-time, instead of sequential execution of the planned sinogram, the projections are executed out of order. That is, we may choose a past or future projection of the planned sinogram rather than the current projection depending on tumor motion, so that the planned radiation source position of the chosen projection is the same as the radiation source position at the current delivery time in the tumor reference frame. The transverse tumor motion is further compensated for by shifting and scaling the leaf open time of the chosen projection. We tested different planned sinograms that were optimized using various synthetic tumor/OAR configurations, as well as planned sinogram of a lung cancer patient, all with zero motion margins. Various TomoTherapy machine parameters and both regular and irregular respiratory traces were used in calculations. By applying the motionadaptive delivery (MAD) technique, the delivered dose matched the planned dose very well in both DVH and dose profiles. As for the regular and minor irregular respiration, the dose errors were well below 3 mm and 3% criteria. No hot and cold spots were noticeable. For irregular respiration with some missing breathing cycles, this method demonstrates the capability for motion margin reduction.