In the current study, a production and distribution network (PDN) is formulated to deliver the products to both inland and outland customers in the least amount of time and optimize the total profit of the network, simultaneously. The proposed network is a multistage PDN with multi suppliers, multi producers, multi entrepots, multi retailers, and multi inland and outland customers with multitime period horizon with allowable shortage. A Mixed integerprogramming model is designed to minimize total cost of the system and minimize total delivery lead time. We applied a novel heuristic method called selective firefly algorithm (SFA) in order to solve several sized, especially real-world, instances. Finally, the performance of the proposed algorithm is examined by solving several sized instances. The results indicated that the proposed algorithm is of higher performance.