Confused in Halo 4

Can you be banned for earning too many onyx medals in a certain amount of time?

I don’t think so.

I’m asking because I got banned again after earning a lot of them.

You got banned because you brought a guest that didn’t get a single kill in several Regicide matches. This flagged you for Boosting and or being inactive in several matches, and gave you your XP ban.

Next time, keep your guests out if they are not going to play.