To accurately locate hidden damage in welded joints, a metal magnetic memory (MMM) gradient model was present based on maximum likelihood estimation (MLE) optimized by particle swarm optimization (PSO). Tabular welded Q235 specimens were subjected to fatigue tensile experiments. Using electron microscope scanning and X-ray detection, it is found that MMM gradient K is sensitive to the location of early hidden damage and decreases with an increase in distance from it. A nonlinear function is then presented between the position parameter and the MMM gradient. MLE is introduced to establish the nonlinear objective function. Furthermore, considering the nonlinear objective function is easy to get into the local rather than the global extremum, the PSO is adopted to optimize the objective function for a global search ability. The results show the location error of the model is 3.48%, therefore MMM provides a new tool for the identification and accurate location of early hidden damage in welded joints.