In nature, raptors exhibit remarkable hunting abilities through their adept use of rapid aerial maneuvers. The key to achieving such exceptional maneuverability lies in the dynamic adjustment of the distance between the center of gravity (COG) and aerodynamic center (AC) across a wide range. Drawing inspiration from this natural phenomenon, we have developed a biomimetic flapping-wing robot with agile flying capabilities. By coordinating adjustments in wing-tail distance and tail attitude, we can effectively manipulate the relative positioning of the robot's COG and AC, as well as modulate wing and tail moments generated with respect to COG, thereby influencing climbing and descending characteristics. This enhanced agility allows us to define and achieve 13 Dynamic Flying Primitives (DFPs), including ascend and pull-up, ascend and inverted flight, dive and inverted flight, among others. Furthermore, by combining different DFPs, we have successfully executed 9 typical maneuvers such as figure-of-eight somersaults, inverted flight maneuvers, large-angle dives followed by steeply climbs, etc., all for the first time on flapping-wing robots. Finally, outdoor flying tests have been conducted to validate that our biologically-inspired flapping-wing flying robot equipped with a self-adjustment strategy for wing-tail distance and tail attitude can achieve unprecedented levels of agile maneuverability.