Smart grid systems use digital communication technology to efficiently monitor and manage electricity distribution. However, there is a need for improve the robustness of smart grid systems. Hence a novel “Secure Smart Grid Implementation with Automatic Data Integrity Attack Location Prediction and Exalted Energy Theft Detection” has been proposed. Current detection methods are not good at identifying data integrity attacks. So a novel Automatic Deterministic Attack Location Prediction Model detects data integrity attacks using a Stacked Watermarking BiGRU-based Deep Deterministic Q network, extracting system matrix and state time series variation. Moreover, Energy theft detection algorithms, which are intended to detect dishonest clients, provide erroneous findings because of linear interpolation processes and randomised near misses, which ignore important data points. Thus a novel Exalted Energy Theft Detector with Secure Encoding is introduced where Amortized Multicode GAN method secures smart grids by detecting energy theft and preventing firmware code modifications, utilising fractional multi-level quantum encoding to identify injection locations. As a result, the proposed model has an accuracy of 97.1%, recall of 96.25%, error rate is 1.36%, F1-score is 96.20%, sensitivity is 96.10%, specificity is 96.10%, MAPE is 0.48%, MSE is 0.0001 and RMSE is 0.017.