Ultra-precision noncircular section components, such as hyperbolic quadrupole in mass spectrometer, can be machined by diamond turning assisted by slow tool servo (STS). However, the bandwidth of STS is usually small, which limits the STS's capability in following the required tool path, leading to a large form error. To reduce the form error, this paper proposes an approach to apply variable spindle speed (VSS) to STS-based turning. Design of the VSS trajectory based on the noncircular profile of the optical component was presented. To validate the proposed approach, experiment on the application of VSS in the STS-based turning process was conducted to machine a typical noncircular component which has a sinusoidal-wave along peripheral direction. The input signals which actuate the tool servo were also analyzed by using FFT to obtain their frequency spectrum.Experiments results show that the form error of the noncircular component in VSS way is less than that machined in CSS way.Therefore,the proposed approach is effective increasing a higher form accuracy of the machined noncircular optical components.