Corona Virus Disease 2019 (COVID-19) is a contagious respiratory disease characterized by its high transmissibility and exponential spread, presenting persistent difficulties. This investigation sought to incorporate machine learning (ML) and transfer learning (TL) and introduced Efficient-VGG16, a novel ensemble approach that integrated the EfficientNet-B0 and VGG16 architectures to classify chest X-ray images as either COVID-19 positive or non-COVID. The COVID-Xray-5k dataset used in the research was split into different training and testing sets (with ratios of 80:20, 75:25, and 70:30), preprocessed, and then used to evaluate the approach’s effectiveness. Throughout the investigation, all procedures operated effectively at the same selected image size, 224*224. Preprocessing included Gaussian blur to remove noise and relics, while Contrast Limited Adaptive Histogram Equalization (CLAHE) adjusted contrast. Among the employed ML classifiers, XgBoost attained the highest accuracy, with F1 scores of 95.78% and 71.56%, respectively. In addition, the research investigated the effectiveness of TL using pre-trained convolutional neural networks (CNNs) such as VGG16, MobileNetV3, ResNet101, Densenet201, and EfficientNet-B0. EfficientNet-B0 achieved the highest levels of accuracy and F1 score, 99.31% and 93.72%, respectively. Furthermore, the proposed Efficient-VGG16 achieved accuracy and an F1 score of 99.46% and 98.41%, respectively, and outperformed TL with EfficientNet-B0 and XgBoost. The investigation demonstrated the effectiveness of the Efficient-VGG16 for accurately classifying COVID-19.