The significant prevalence of distributed energy resources in microgrids due to their unique characteristics and activities creates protection issues. This paper introduces fault detection and its location in an MG. The aim of the investigation is to enhance the system's efficiency and dependability, and fault detection and prediction are employed. Data are gathered from the operational Microgrid (MG) infrastructure dataset, and the data are fed to the Newton Time‐Extracting Wavelet Transform (NTEWT). It cleanses the data and enhances the input data's quality. After the preprocessed data are fed to the feature extraction by using Distorted Gaussian Matched Filtering (DGMF), it extracts the five statistical features from the voltage signal. The optimal features are fed to the Deep Attention Dilated Residual Convolutional Neural Network (DADRCNN), which predicts the faults in the microgrid. The Dung Beetle Optimization (DBO) is utilized to optimize the weight parameter of DADRCNN. The MATLAB platform is utilized to implement the proposed method. The proposed method is contrasted with various existing approaches like Graph Convolutional Network and Graph Fourier Transform (GCN‐GFT), Feed‐Forward Neural Network and Back‐Propagation Algorithm (FFNN‐BPA), and Discrete Wavelet Transform and Radial Basis Function Neural Network (DWT‐RBFN). The existing method shows a fault detection rate of 91.12, 88.80, and 84.239, and the proposed technique illustrates a fault detection rate of 99.9640, which is higher than other existing approaches. The existing method shows a false alarm rate of 0.758, 1.028, and 1.564, and the proposed technique shows a false alarm rate of 0.2519, which is lower than other existing methods. The proposed approach exhibits a reduced false alarm rate and a greater fault detection rate, it is concluded.