Background: SARS-CoV-2 has caused a tremendous threat to global health. PCR and antigen testing have played a prominent role in the detection of SARS-CoV-2-infected individuals and disease control. An efficient, reliable detection tool is still urgently needed to halt the global COVID-19 pandemic. Recently, FDA emergency approved VOC as an alternative test for COVID-19 detection. Methods and materials: In this case-control study, we prospectively and consecutively recruited 95 confirmed COVID-19 patients and 106 healthy controls in the designated hospital for treatment of COVID-19 patients in Shenzhen, China. Exhaled breath samples were collected and stored in customized bags and then detected by HPPI-TOFMS for volatile organic components (VOCs). Machine learning (ML) algorithms were employed for COVID-19 detection model construction. Participants were randomly assigned in a 5:2:3 ratio to the training, validation, and blinded test sets. The sensitivity (SEN), specificity (SPE), and other general metrics were employed for the VOCs based COVID-19 detection model performance evaluation. Results: The VOCs based COVID-19 detection model achieved good performance, with a SEN of 92.2% (95% CI: 83.8%, 95.6%), a SPE of 86.1% (95% CI: 74.8%, 97.4%) on blinded test set. Five potential VOC ions related to COVID-19 infection were discovered, which are significantly different between COVID-19 infected patients and controls. Conclusions: This study evaluated a simple, fast, non-invasive VOCs-based COVID-19 detection method and demonstrated that it has good sensitivity and specificity in distinguishing COVID-19 infected patients from controls. It has great potential for fast and accurate COVID-19 detection.