To obtain the flexibility of choice of cutting tool and to compensate the wear of the cutting tool, this paper presents an interference-free toolpath generating method for multi-axis machining of a cylindrical cam. The notion of the proposed method is that the cutting tool is confined within the meshing element and the motion of the cutting tool follows the meshing element so that collision problem can be avoided. Based on the envelope theory, homogeneous coordinate transformation and differential geometry, the cutter location for multi-axis NC machining using cylindrical-end mill is derived and the cutting path sequences with the minimum lead in and lead out are planned. The cutting simulations with solid model are performed to verify the proposed toolpath generation method. It is also verified through the trial cut with model material on a five-axis machine tool.