The thermal error of direct driving type A/C axis CNC milling head in the practical processing is analyzed. Based on the theory of homogeneous coordinate transformation and small error hypothesis, the transformation matrixes between the coordinate system of kinematic pairs and the relationship between errors and compensations are obtained. The thermal error compensation model and the thermal error compensation system which embedded into the Siemens 840D system are established, and play an important role in increasing the processing accuracy.