The invention discloses a sensor for measuring rotary machining torque and axial force. A strain measuring principle is adopted, and the sensor is mainly used for measuring the torque and the axial force in a rotary machining process. The sensor consists of an elastic element (3), a bottom plate (1), a workpiece clamping device, a shell (4), a rubber protecting cover (5), positioning pins, screws and a plug (10), and is characterized in that: the elastic element is an integrally machined workpiece with a four-beam and four-post structure and respectively comprises an upper circular ring (a), four posts (b), a transition round disc (c), four beams (d) and a lower circular ring (e), wherein the four posts are respectively connected with the upper circular ring and the transition round disc to form the four beams of which the two ends are fixed mechanically, and are used for measuring the torque; and the four beams are respectively connected with the lower circular ring and the transition round disc to also form the four beams of which the two ends are fixed mechanically, and are used for measuring the axial force. The structure has high sensitivity and high eccentric load resistance, and can meet the requirements of different measurement ranges, different sensitivities and inherent frequency.