Because of the interference of angular and linear vibration in-moving initial alignment, information of the gravity and rotational angular velocity of the earth can’t be separated from the measurement of the gyros and accelerometers to calculate the attitude. With the information of position from GPS, this paper takes inertial frame as computing reference to guarantee the accuracy of initial alignment direction cosine matrix. Ulteriorly, in-moving initial alignment is converted to the Wahba’s problem (attitude determination based on measurement vector), and a new q-method recursive algorithm with memory exponential fading factor is proposed for this. Finally, the results of tests prove that the proposed method is of stronger robustness, higher alignment accuracy and faster convergence than the traditional method.