The paper focuses on the problem of instance selection. Instance selection is currently crucial to enhance the efficacy and efficiency of machine-learning tools when they are used to solve a data-mining task and when the data are large and they are seen through the prism of the big data phenomenon. Instance selection eliminates redundant instances and thus reduces the size of the training data set. The training data, with redundant cases removed, can be more useful and ensure better performance of the final classification models. The instance selection problem belongs to the NP-hard class, so it can be solved with an approximation tool. In this paper the firefly algorithm is proposed for solving the instance selection problem. This paper is one paper, where the firefly algorithm has been used to solve a discrete optimisation problem, when in more cases previously it has been used for solving continuous optimisation problems. The firefly-based instance selection algorithm is presented and its validation is carried out. The results of the computational experiment show that the algorithm is competitive with others. The results obtained are discussed and conclusions are formulated.