This paper proposes a robust fault tolerant control scheme for a class of second-order uncertain nonlinear systems. First, a novel PI full-order sliding mode (PI-FOSM) control, which integrates a new PI-FOSM sliding surface and a continuous control law, is developed. The crucial parameters of the controller are optimally selected by Bat algorithm so that the nearly optimal performance of the controller can be achieved. In addition, the unknown system dynamics is approximated by using a radial basic function neural network (RBFNN) so that the proposed controller does not require an exact model of the system. Compared with other existing sliding mode controllers for fault tolerant control system, the proposed method provides very strong robustness, low oscillation, fast convergence and high precision. The superior performance of the proposed robust fault tolerant controller is proved through simulation results for attitude control of a spacecraft.