Curve and surface reconstruction methods play an important role in many research and engineering fields. It is an imperative procedure to carry out surface reconstruction from measurement data in reverse engineering, which is complicated with the presence of outliers. To achieve better accuracy and robustness of reconstruction, an improved moving total least squares (MTLS) algorithm based on k-means clustering called a KMTLS method is proposed in this article. Based on MTLS, KMTLS adjusts the weight of discrete points within the support domain by adopting a two-step fitting procedure. Firstly, an ordinary least squares (OLS) method is adopted to obtain the pre-fitting result and calculate the residuals as the input of k-means clustering. In k-means clustering, abnormal nodes are classified into one cluster and a weight function based on clustering information is introduced to deal with these nodes. Secondly, based on the compact weight function in MTLS and the weight obtained in the pre-fitting procedure, a weighted total least squares method is conducted to determine the final estimated value. The process of detecting outliers is automatic without setting threshold artificially. The simulation and experiment show that KMTLS has great robustness and accuracy.