Fireworks algorithm (FWA) is a novel swarm intelligence algorithm recently proposed for solving complex optimization problems. Because of its powerful global optimization ability to solve classification problems, we first present an optimization classification model in this paper. In this model, a linear equation set is constructed according to classification problems. This optimization classification model can be solved by most evolutionary computation techniques. In this research, a self-adaptive fireworks algorithm (SaFWA) is developed so that the optimization classification model can be solved efficiently. In SaFWA, four candidate solution generation strategies (CSGSs) are employed to increase the diversity of solutions. In addition, a self-adaptive search mechanism has also been introduced to use the four CSGSs simultaneously. To extensively assess the performance of SaFWA on solving classification problems, eight datasets have been used in the experiments. The experimental results show that it is feasible to solve classification problems through the optimization classification model and SaFWA. Furthermore, SaFWA performs better than FWA, FWA variants with only one CSGS, particle swarm optimization (PSO), and differential evolution (DE) on most of the training sets and test sets.