Computer numerical control (CNC) worktable is the most important part of CNC machines. The CNC worktable exhibits complex nonlinear dynamic behaviors in the milling process. The physical model and mathematical model of CNC worktable are presented, where the nonlinear factors such as clearance and friction are considered. The primary resonance of computer numerical control worktable with clearance and friction under harmonic excitation is investigated. The approximate analytical solution of primary resonance is obtained by using the averaging method. The stability condition of the steady-state solution is also exhibited. It is found that the clearance affects the dynamic characteristics of the system in the form of equivalent nonlinear stiffness, and the friction coefficient acts in the form of equivalent nonlinear damping. The correctness of the approximate analytical solutions is verified by comparing the numerical results with the approximate analytical solutions. The approximate analytical solution is in good agreement with its corresponding numerical solution. The effects of clearance and friction on the dynamic characteristics of the system are analyzed in detail. The stick-slip vibration induced by friction is also analyzed by phase portrait at low feed velocity of machine tool. The results can provide a reference for the dynamic analysis of CNC worktable.