Machine Gun Kelly went off at the O.C. Fair after a dude decided to indelicately compliment Megan Fox … according to the brother of the guy MGK swung at.

Nelson Zuniga tells TMZ … he and his fam were waiting to get on the UFO ride Thursday night, when MGK and Megan stepped off it.

His little brother, Angel, recognized Megan, telling her she was “beautiful as f***’ … which triggered the now-viral ordeal.

Nelson says the comment enraged MGK, who retaliated with a slap. He says his youngest brother tried to punch MGK but missed.

As for Angel’s comment about Megan, Nelson says it was a compliment and MGK should have taken it as such.

As we reported, MGK and Megan’s security guard swooped in to push Nelson’s brothers back, but he accidentally ended up shoving Megan in the process.

Nelson and co. still aren’t sure if they’re gonna press charges against Kelly, but they are talking to lawyers. We’re guessing that won’t go far. BTW, he says they weren’t fans of his music before all this — we doubt that’s gonna change any time soon.