In response to the coronavirus disease 2019 (COVID-19) pandemic, healthcare providers are exposed to psychological and mental health implications, including vicarious traumatization, anxiety, and depression. Gradual increases in the number of COVID-19 cases meant they were inadequately protected from contamination due to a shortage of protective equipment, excessive workloads, emotional exhaustion and frustration. These circumstances affect their work performance in delivering health services. This study aims to compare the levels of anxiety in frontline and non-frontline healthcare providers during the COVID-19 pandemic. This study applied a comparative cross-sectional design between May and July 2020 at the Hospital Raja Perempuan Zainab II. Convenient sampling was applied in the selection of eligible participants. The case report form contained two self-administered questionnaires, namely, The Hospital Anxiety and Depression Scale and Medical Outcome Study Social Support Survey. Descriptive analysis, analysis of variance, and analysis of covariance were conducted using SPSS version 26. The number of participants recruited was 306, including 160 healthcare providers in the frontline group and 146 in the non-frontline group. The non-frontline healthcare providers reported a significantly higher anxiety mean score of 1.7 than the frontline providers after adjusting for gender, duration of employment, and social support. It indicates that non-frontline healthcare providers require psychological support similar to that of frontline healthcare providers during the COVID-19 pandemic.