The invention relates to a device and method for measuring the mechanical energy from a moving human body in real time. The method specifically comprises the following steps: S1, acquiring human bodyskeleton joints of a target human body, normalizing movement directions, and setting a skeleton coordinate system; S2, carrying out contour division, identifying coordinates of skeleton joints by combining with the skeleton coordinate system, and dividing the skeleton joints into multple links; S3, acquiring anthropometric data, and determining link length and link quality; S4, calculating the centroid of the links; S5, acquiring rotation information of skeleton joint coordinates, and calculating translation kinetic energy, rotation kinetic energy and potential energy of the links to serve asinternal work of target human body motion; S6, calculating a centroid movement track of the target human body, and calculating the kinetic energy and potential energy of the target human body according to the centroid movement track to serve as external work of the target human body motion; and S7, adding the internal work to the external work to obtain the mechanical energy of the target human body and the link acting efficiency of a single link. Compared with the prior art, the method has the advantages of simple structure, convenience in cost, small site limitation and the like.