Firefly algorithm is among the nature-inspired optimization algorithms. The standard firefly algorithm has been successfully applied to many engineering problems. However, this algorithm might be stuck in stagnation (the solutions do not enhance anymore) or possibly fall in premature convergence (fall in to the local optimum) in searching space. It seems that both issues could be connected to the exploitation and exploration. Excessive exploitation leads to premature convergence, while excessive exploration slows down the convergence. In this study, the classical firefly algorithm is modified such that make a balance between exploitation and exploration. The purposed modified algorithm ranks and sorts the initial solutions. Next, the operators named insertion, swap and reversion are utilized to search the neighbourhood of solutions in the second group, in which all these operators are chosen randomly. After that, the acquired solutions combined with the first group and the firefly algorithm finds the new potential solutions. A multi-echelon supply chain network problem is chosen to investigate the decisions associated with the distribution of multiple products that are delivered through multiple distribution centres and retailers to end customers and demonstrate the efficiency of the proposed algorithm.