In the present work, India’s primary energy use is analysed in terms of four socio-economic variables, including Gross Domestic Product, population, and the amounts of exports and imports. Historical data were obtained from the World Bank database for 44 years as annual values (1971–2014). Energy use is analysed as an optimisation problem, where a unique ensemble of two metaheuristic algorithms, Grammatical Evolution (GE), and Differential Evolution (DE), is applied. The energy optimisation problem has been investigated in two ways: estimation and a year-ahead prediction. Models are compared using RMSE (objective function) and further ranked using the Global Performance Index (GPI). For the estimation problem, RMSE values are found to be as low as 0.0078 and 0.0103 on training and test datasets, respectively. The average estimated energy use is found in good agreement with the data (RMSE = 6.3749 kgoe/capita), and the best model (E10) has an RMSE of 5.8183 kgoe/capita, with a GPI of 1.7249. For the prediction problem, RMSE is found to be 0.0096 and 0.0122 on training and test datasets, respectively. The average predicted energy use has RMSE of 7.8857 (kgoe/capita), while Model P20 has the best value of RMSE (7.9201 kgoe/capita) and a GPI of 1.8836.