Background. Functional near-infrared spectroscopy (fNIRS) is being extensively explored as a potential primary screening tool for major depressive disorder (MDD) because of its portability, cost-effectiveness, and low susceptibility to motion artifacts. However, the fNIRS-based computer-aided diagnosis (CAD) of MDD using deep learning methods has rarely been studied. In this study, we propose a novel deep learning framework based on a convolutional neural network (CNN) for the fNIRS-based CAD of MDD with high accuracy. Materials and Methods. The fNIRS data of participants—48 patients with MDD and 68 healthy controls (HCs)—were obtained while they performed a Stroop task. The hemodynamic responses calculated from the preprocessed fNIRS data were used as inputs to the proposed CNN model with an ensemble CNN architecture, comprising three 1D depth-wise convolutional layers specifically designed to reflect interhemispheric asymmetry in hemodynamic responses between patients with MDD and HCs, which is known to be a distinct characteristic in previous MDD studies. The performance of the proposed model was evaluated using a leave-one-subject-out cross-validation strategy and compared with those of conventional machine learning and CNN models. Results. The proposed model exhibited a high accuracy, sensitivity, and specificity of 84.48%, 83.33%, and 85.29%, respectively. The accuracies of conventional machine learning algorithms—shrinkage linear discriminator analysis, regularized support vector machine, EEGNet, and ShallowConvNet—were 73.28%, 74.14%, 62.93%, and 62.07%, respectively. Conclusions. In conclusion, the proposed deep learning model can differentiate between the patients with MDD and HCs more accurately than the conventional models, demonstrating its applicability in fNIRS-based CAD systems.