Grey wolf optimization (GWO) is a recent and popular swarm-based metaheuristic approach. It has been used in numerous fields such as numerical optimization, engineering problems, and machine learning. The different variants of GWO have been developed in the last 5 years for solving optimization problems in diverse fields. Like other metaheuristic algorithms, GWO also suffers from local optima and slow convergence problems, resulted in degraded performance. An adequate equilibrium among exploration and exploitation is a key factor to the success of meta-heuristic algorithms especially for optimization task. In this paper, a new variant of GWO, called inertia motivated GWO (IMGWO) is proposed. The aim of IMGWO is to establish better balance between exploration and exploitation. Traditionally, artificial neural network (ANN) with backpropagation (BP) depends on initial values and in turn, attains poor convergence. The metaheuristic approaches are better alternative instead of BP. The proposed IMGWO is used to train the ANN to prove its competency in terms of prediction. The proposed IMGWO-ANN is used for medical diagnosis task. Some benchmark medical datasets including heart disease, breast cancer, hepatitis, and parkinson's diseases are used for assessing the performance of IMGWO-ANN. The performance measures are described in terms of mean squared errors (MSEs), classification accuracies, sensitivities, specificities, the area under the curve (AUC), and receiver operating characteristic (ROC) curve. It is found that IMGWO outperforms than three popular metaheuristic approaches including GWO, genetic algorithm (GA), and particle swarm optimization (PSO). Results confirmed the potency of IMGWO as a viable learning technique for an ANN.