Viral shedding has commonly been used as a proxy measure for infectivity. Therefore, identification of the duration of viral shedding would be central to inform control policies and antiviral treatment in patients with COVID-19. In the current study of 120 hospitalised non-critically ill patients with COVID-19, we have for the first time identified that older age and the lack of LPV/r treatment were independent risk factors for prolonged viral shedding. We have also found that an initial administration of LPV/r treatment within 10 days from symptom onset, but not afterwards, could shorten the duration of SARS-CoV-2 RNA shedding. However, we did not observe an impact of comorbidities and corticosteroid use on the duration of viral shedding.