AbstractSeveral machine learning and deep learning algorithms have been presented to detect the criminal behaviours in a smart grid environment in recent studies because of many successful results. However, most learning algorithms for the electricity theft detection have their pros and cons; hence, a critical research issue nowadays has been how to develop an effective detection algorithm that leverages the strengths of different learning algorithms. To demonstrate the performance of such an integrated detection model, the algorithm proposed first builds on deep neural networks, a meta‐learner for determining the weights of detection models for the construction of an ensemble detection algorithm and then uses a promising metaheuristic algorithm named search economics to optimise the hyperparameters of the meta‐learner. Experimental results show that the proposed algorithm is able to find better results and outperforms all the other state‐of‐the‐art detection algorithms for electricity theft detection compared in terms of the accuracy, F1‐score, area under the curve of precision‐recall (AUC‐PR), and area under the curve of receiver operating characteristic (AUC‐ROC). Since the results show that the meta‐learner of the proposed algorithm can improve the accuracy of deep learning algorithms, the authors expect that it will be used in other deep learning‐based applications.