The earthing system is considered as a very important aspect of electrical power system in terms of reliability, dependency and safety. Carrying the fault current and ensuring the safety of the operator and the equipment are the two fundamental requirements of an electrical earthing system. Moreover, by modifying the grid configuration or by reducing the earth fault current, the performance can be improved. Normally the reduction of fault current may cause changes in grid shape and size by changing the conductor spacing, grid dimensions, conductor length, grid depth and adding vertical grounding rods. A square and rectangular grid, buried in two-layer soil model is considered with unequal spaced grounding grid. This paper aims to ascertain the ideal grounding grid configuration about safety factors such as Ground Potential Rise (GPR), earthing grid resistance, touch as well as step voltages. Moreover, a square and rectangular grid, buried in a two-layer soil model are considered with Unequal Conductor Spacing. For developing an effective and economic square and rectangular earthing system for the unequally spaced design, a mathematical cost function (CF) is presented along with the modern computational intelligent technique. Hence, a Modified Harris Hawks Optimizer (MHHO) technique was proposed which is the conceptual improvement of the standard Harris Hawks Optimizer (HHO). Accordingly, the cost obtained by the proposed MHHO technique is 8.19%, 9.6%, 3.44%, 11.1% and 2.43% which is lower than other existing methods like PSO, GA, FF, HHO, MOPSO at 60th iteration, for population size 10.