In this paper, a hybrid method of grey wolf optimizer (GWO) and lateral inhibition (LI) is proposed to solve complicated template matching problems. The proposed template matching technique is called LI-GWO. GWO is a new meta-heuristic algorithm inspired by the hunting behavior and social leadership of grey wolves in nature. In addition, lateral inhibition mechanism has been verified to have good effects on image edge extraction and image enhancement. So we employ lateral inhibition for image pre-processing. LI-GWO combines both advantages of GWO and literal inhibition and makes better performance. Series of comparative experimental results show that the proposed method achieves the best balance in comparison to other algorithms based on lateral inhibition in terms of estimation accuracy and the computational cost.