In this paper, a novel method for suppressing the detent force of permanent magnet linear synchronous motors is proposed. First, the end force is adjusted to offset the cogging force while the cogging force remains unchanged. On the other hand, the proposed method can arbitrarily change the shape of the end magnetic regulating module (EMRM), thus allowing the end force to obtain a wider adjustment range, which is different from the conventional limited shape optimization. More interestingly, compared to the traditional approach for suppressing the end force, which is to suppress the end force to the lowest level, the proposed method does not necessarily suppress the end force to the lowest level, but rather adjusts it to a reasonable level, so that it can offset the cogging force. This leads to the fact that the optimized end magnetic regulating module is effective in adjusting the end force and may even increase the end force, which is different from the conventional idea of suppressing the detent force. Next, the optimal EMRM's topologies are solved using the optimization algorithm, which replaces the traditional low-dimensional single-direction optimization and performs multi-direction global search. Finally, the prototype with optimal EMRM's topology and the testing platform are established and the experimental results validate the effectiveness of the proposed method.