For decades, image enhancement has been considered one of the most important aspects in computer science because of its influence on a number of fields including but not limited to medical, security, banking and financial sectors. In this paper, a new gray level image (edge preserving) enhancement method called the harmony search algorithm (HSA) is proposed. HSA is a recently introduced population-based algorithm stemmed by the musical improvisation process when a group of musicians play the pitches of their instruments seeking for pleasing harmony. Tremendous successful stories of HSA application to a wide variety of optimization problems have been passed on at a large scale. In order to evaluate the proposed HSA-based image enhancement method, 14 standard images from the literature are used. For comparative evaluation, the results of the 14 enhanced image produced by HSA are compared with two classical image enhancement methods (i.e., Histogram Equalization algorithm and Image Adjacent algorithm) and two advanced methods (i.e., genetic algorithm and particle swarm optimization). It is note worthy that all these methods employed the same criteria (number of edges in an gray scaled images, summation intensity of edges detected using a Sobel filter and entropy measure) in order to evaluate their results. The HSA almost achieves the best results in comparison with the other classical and advanced image enhancement algorithms. Due to such achievements, we believe that the proposed method is very promising and has a potential to provide a substantial addition to the image enhancement domain. © 2016 the authors.