Because she had an affair. I think it might have been a good friend of Fitz's. I can't remember but I know she had one. It was mentioned in season 1 or 2 during the flashbacks. That is why Mellie needs Fitz to forgive her.
I find Mellie to be very ruthless. Someone who would fake having a miscarriage just to score some voting points is one scary person. I wouldn't put it past her to have something to do with the assassination. But I am not sure what she would have to gain by killing him.