Previous research has highlighted the executive function (EF) deficits present in depressed patients; however, conflicting results exist regarding the impact of depression severity on the size of these deficits. This study aimed to compare deficits in EF between antidepressant naïve inpatient and outpatient depressed, a group with subclinical depression symptoms, and a healthy control group while controlling for education, sex, and age. In cross-sectional research, 245 antidepressant naive participants (46 inpatient, 68 outpatient, 65 subclinical, and 67 healthy control individuals) were recruited by convenience sampling. The Structured Clinical Interview for DSM-5 Disorders (SCID-5) and Beck Depression Inventory-II (BDI-II) were used to assess depression. EF was measured using several neuropsychological tests, including the Stroop Color-Word Test, the Wisconsin Card Sorting Test, and the N-back Test, which assessed the components of Inhibition, Shifting, and Updating, respectively. Multivariate analysis of covariance revealed a significant difference between the groups in EF components (p < 0.001). Pairwise comparisons further showed that inpatient and outpatient patients had more depressive symptoms and worse EF performance than subclinical and healthy control groups (p < 0.05). In the analysis of EF measures, a significant difference was found among the four groups, with post-hoc tests revealing variations in specific EF components. Overall, patients with more severe depressive symptoms show more deficits in EF. Additionally, correlations between clinical characteristics and EF measures varied across patient groups, but many correlations became non-significant after adjusting for the false discovery rate (FDR). This study emphasizes the impact of depression severity on deficits in the EF of depressed patients and at-risk populations. Consequently, it is important to consider executive dysfunctions as an underlying vulnerability in the development and persistence of depressive disorder.