In machine learning, multilayer perceptrons (MLPs) have long been used as one of the most popular and effective classifiers. With training the crucial process, the susceptibility of conventional algorithms such as back-propagation to get stuck in local optima has encouraged many researchers to opt for metaheuristic algorithms instead. In this paper, we propose a novel population-based metaheuristic algorithm for MLP training using Lévy flight distribution (LFD). In our approach, the optimum weights of the network are found via a population of agents moving through the search space either by Lévy flight motions or by random walks. Comparing the results of this algorithm on several datasets from the UCI repository with other population-based metaheuristic algorithms shows excellent results and superiority of the LFD algorithm.