Clean it with gunscrubber, then give the slide stop a drop or two of gun oil, and a drop where the rails make contact.
Make sure the recoil spring guide rod is seated correctly and lubed.
Also check to make sure the recoil spring is not broken any where.
Saw one break on a studentís new M&P last week, which was very unusual.
Put an empty mag in and pull the slide all the way back.
It should lock back on an empty mag. Also try it with a different mag.
Please let us know if that helps.
Professionally trained concealed carry and license to carry instructor.