In this paper, a new approach is suggested for asymptotic stabilization of a class of nonaffine quadratic polynomial systems in the presence of uncertainties. The designed controller is based on the sliding mode (SM) technique. This technique is basically introduced for nonlinear affine systems and in facing with nonaffine systems; attempts have been made to transform the system into an affine form. Lake of robustness is the main problem of the transformation approach. In this paper, a simple but effective idea is suggested to stabilize a system in its nonaffine structure and, therefore, a nonrobust transformation is not needed. In the proposed method, according to upper and lower bounds of uncertainties, two quadratic polynomials are constructed and with respect to the position of the roots of these polynomials, a new SM controller is proposed. This idea is also used for robust stabilization of a practical nonaffine quadratic polynomial system (magnetic ball levitation system). Computer simulations show the efficiency of the proposed control law.