Complex systems contain a large number of components, and in some cases, failure of one or more of these components can cause the entire system to fail. Replacing failed components with other functioning components properly in the original system can be an attractive way for improving system reliability. This paper proposes a new system reliability optimization model to achieve optimal component reliability and the ideal component-swapping strategy under a certain set of constraints. Furthermore, the survival signature is introduced to more efficient calculation of system reliability under various component-swapping cases, and an artificial bee colony (ABC) algorithm with local search method for component swapping is applied to solve the optimization problem. Finally, numerical examples are presented to illustrate the optimization process.