The moving least-squares (MLS) method has been developed for fitting measurement data contaminated with errors. The local approximants of the MLS method only take the random errors of the dependent variable into account, whereas the independent variables of measurement data always contain errors. To consider the influence of errors of dependent and independent variables, the moving total least-squares (MTLS) method is a better choice. However, both MLS and MTLS methods are sensitive to outliers, greatly affecting fitting accuracy and robustness. This paper presents an improved method, the trimmed MTLS (TrMTLS) method, in which the total least-squares method with a truncation procedure is adopted to determine the local coefficients in the influence domain. This method can deal with outliers and random errors of all variables without setting the threshold or adding small weights subjectively. The results of numerical simulation and experimental measurements indicate that the proposed algorithm has better fitting accuracy and robustness than the MTLS and MLS methods.