In a subset of SARS-CoV-2 infected individuals treated with the oral antiviral nirmatrelvir-ritonavir, the virus rebounds following treatment. The mechanisms driving this rebound are not well understood. We used a mathematical model to describe the longitudinal viral load dynamics of 51 individuals treated with nirmatrelvir-ritonavir, 20 of whom rebounded. Target cell preservation, either by a robust innate immune response or initiation of nirmatrelvir-ritonavir near the time of symptom onset, coupled with incomplete viral clearance, appear to be the main factors leading to viral rebound. Moreover, the occurrence of viral rebound is likely influenced by time of treatment initiation relative to the progression of the infection, with earlier treatments leading to a higher chance of rebound. Finally, our model demonstrates that extending the course of nirmatrelvir-ritonavir treatment, in particular to a 10-day regimen, may greatly diminish the risk for rebound in people with mild-to-moderate COVID-19 and who are at high risk of progression to severe disease. Altogether, our results suggest that in some individuals, a standard 5-day course of nirmatrelvir-ritonavir starting around the time of symptom onset may not completely eliminate the virus. Thus, after treatment ends, the virus can rebound if an effective adaptive immune response has not fully developed. These findings on the role of target cell preservation and incomplete viral clearance also offer a possible explanation for viral rebounds following other antiviral treatments for SARS-CoV-2.ImportanceNirmatrelvir-ritonavir is an effective treatment for SARS-CoV-2. In a subset of individuals treated with nirmatrelvir-ritonavir, the initial reduction in viral load is followed by viral rebound once treatment is stopped. We show the timing of treatment initiation with nirmatrelvir-ritonavir may influence the risk of viral rebound. Nirmatrelvir-ritonavir stops viral growth and preserves target cells but may not lead to full clearance of the virus. Thus, once treatment ends, if an effective adaptive immune response has not adequately developed, the remaining virus can lead to rebound. Our results provide insights into the mechanisms of rebound and can help develop better treatment strategies to minimize this possibility.