The invention relates to a method and a device for eliminating motion artifact of K spacial sampled data in a magnetic resonance imaging (MRI) system. The method comprises the following steps of: sampling data; preprocessing the data, namely ensuring the consistency of echo signal intensity, and moving the echo maximum to the center; estimating rotary motion, namely searching echo reference pairs between a rotary data tape and a basis data tape by utilizing frequency domain similarity, calculating relative angle offset among the reference pairs, establishing a rotary motion equation set, and introducing a constraint condition to solve rotary motion parameters; estimating translational motion, namely establishing a translational equation set to solve translational motion parameters according to a data consistency principle equivalent equation and the rotation angle obtained in the last step; compensating motion parameters, namely performing motion compensation on the motion parameters solved in the step 3 and the step 4; and performing filtered backprojection weighted reestablishment, namely adopting a filtered backprojection method for weighted reestablishment. The method or the device can effectively inhibit motion artifact.