This paper presents a central pattern generator (CPG) based locomotion control method for a pectoral-fin propelled robotic fish with considering the bio-inspired swimming mechanism. A nonlinear differential equation is employed as the model of neural oscillators, in which undulation frequency and amplitude can be modulated independently. With nearestneighbor coupling connections, the CPG network model is constructed by coupling n such neural oscillators. The existence, uniqueness and stability of the limit cycle of its neural oscillator are proved. Based on the kinematic analysis of pectoral-fin based propulsion, the control methods of swimming forward and backward as well as pectoral-fin and body-caudal-fin coordination motion for the robotic fish are derived. Simulations and experimental results validate the feasibility of the CPG model and the effectiveness of the proposed control methods.