The current distribution in the electromagnet is optimized so as to maximize the acceleration performance of a superconducting linear acceleration (SLA) system. As a novel pellet injection system for a fusion reactor, the SLA system has been proposed recently. The SLA system is composed of the electromagnet and the pellet container to which a high-temperature superconducting (HTS) film is attached. The pellet container is accelerated by using the Lorentz force between the HTS film and the electromagnet. In the present study, the current distribution in the electromagnet is represented as a set of the filaments by the on-off method. Moreover, the current distribution optimization is performed by using the non-dominated sorting genetic algorithm II (NSGA-II). Furthermore, the dynamic motion of the pellet container is determined by solving the equivalent-circuit model and Newton's equation of motion. According to the numerical results, the acceleration performance is improved by partly applying the electric current to the electromagnet. Compared with the case of the homogeneous current distribution, the pellet velocity for the optimized current distribution increases by 26%.