In this paper, modeling, locomotion generation, motion library design and path planning for a real prototype of an An-guilliform robotic fish are presented. The robotic fish consists of four links and three joints, and the driving forces are the torques applied to the joints. Considering kinematic constraints and hydrodynamic forces, Lagrangian formulation is used to obtain the dynamic model of the fish. Using this model, three major locomotion patterns of Anguilliform fish, including forward loco-motion, backward locomotion and turning locomotion are investigated. It is found that the fish exhibits different locomotion patterns by giving different reference joint angles, such as adding reversed phase difference, or adding deflections to the original reference angles. The results are validated by both simulations and experiments. Furthermore, the relations among the speed of the fish, angular frequency, undulation amplitude, phase difference, as well as the relationship between the turning radius and deflection angle are investigated. These relations provide an elaborated motion library that can be used for motion planning of the robotic fish.