In the literature it is observed that complex image processing operations are used in the classification of Ball Grid Array (BGA) X-ray images, however high classification results were not achieved. In recent years, it has been shown that deep learning methods are very successful especially in classification problems. In this study, a new deep neural network (DNN) model is proposed to classify the BGA X-ray images. The proposed DNN model contains feature extractor layers and a minimum distance classifier. Since the proposed network consists of less number of layers (4 convolution layers and 1 fully connected layer), determination of the hyper-parameters of the network and training of the network are accomplished in a short time. BGA X-ray images are categorized into 4 classes according to the conditions of the solder joints: normal, short-circuit, bonding defect and void defect. The dataset used in this study is comprised of 67, 76, 53 and 76 images for these classes, respectively. 80% of all data is allocated for the training set and the remaining 20% is allocated for the test set. Compared with the existing methods in the literature, a very high success rate of 97% is achieved for the classification of BGA X-ray images with the proposed method.