In the fitting of scattered data, there may be a few sample values that contain high noise, which are called outliers. In dealing with such scattered data, the approximation effect of the classical moving least squares (abbr. MLS) is greatly reduced due to the existence of outliers. In this paper, a modified moving least squares (abbr. MMLS) is proposed, which can recognize outliers automatically from scattered data and weaken the influence of the outliers in fitting by an added weight function in MLS. It is theoretically proven that if the only noise existing in scattered data is outliers, the solution of MMLS is close to that of MLS in the absence of outliers. Because the computational process of the proposed MMLS is consistent with the classical MLS, the computational efficiency of MMLS is higher than that of Levin's moving least-hardy method (abbr. MLH) which is proposed to also deal with the fitting of scattered data with outliers by iterative solution. The numerical experiments not only confirm the property of MMLS but also show that the approximation effect of MMLS is almost identical with that of MLH. (C) 2019 Elsevier B.V. All rights reserved.