This paper proposes a new method for detecting COVID-19 in chest X-ray images by comparing it with existing models. Our proposed deep learning model is customized for an accurate diagnosis of COVID-19. To improve model performance and prevent overfitting, we first apply data augmentation techniques. Unlike traditional image segmentation methods, we use gradient-weighted class activation mapping (Grad-CAM) to highlight regions critical to identifying COVID-19. We then used transfer learning of Xception convolutional neural networks to extract the X-ray image data into a compact feature set. Finally, we design, parameterize, and train the neural classification network. The network showed impressive results, achieving an astonishing 97% accuracy in identifying healthy patients. At the same time, its detection rate in COVID-19-infected patients was 92%, making it a worthy competitor compared to other detection models.