This paper proposes a modified discrete firefly algorithm (DFA) applied to the machine loading problem of the flexible manufacturing systems (FMSs) starting from the mathematical formulation adopted by Swarnkar & Tiwari (2004). The aim of the problem is to identify the optimal jobs sequence that simultaneously maximizes the throughput and minimizes the system unbalance according to given technological constraints (e.g. available tool slots and machining time). The results of the algorithm proposed have been compared with the existing and most recent swarm-based approaches available in the open literature using as benchmark the set of ten problems proposed by Mukhopadhyay et al. (1992). The algorithm shows results that are comparable and sometimes even better than most of the other approaches considering both the quality of the results provided and the computational times obtained.