Just by reading it, I'd say sentence 2 is correct and sentence 1 is wrong. I can't give you a detailed and well-supported explanation, though. A synonym of the phrase 'no matter what' could be 'whatever happens', or 'whatever might happen [to you]'.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.