In the precision measurement of the tooth flank of cycloidal gear, there are many reasons that affect the measurement accuracy. Among the reasons, the alignment angle error of the gear axis play an important role in the measurement results of the profile and tooth trace deviations of the tooth flank. According to the measurement theory of the cycloidal gear, the mathematics model of the tooth flank is established. Based on the measurement process of the profile and tooth trace deviations by the gear measuring machine, a compensation method for the alignment angle error of the gear axis that included in the measurement results is designed. Some simulation experiments were done to verify the proposed method. Experimental results show that after compensation, the alignment angle error of the gear axis reduces significantly, more than 80% of the alignment angle error in profile deviation and more than 74% of the alignment angle error in tooth trace deviation is compensated by the method. The proposed method is helpful to improve the measurement accuracy of the cycloidal gear.