The horrifying footage was recorded by a spectator as the game in Toluca erupted into a mass brawl at halftime last weekend (Sept 10/11).
As players pushed and shoved each other, one man suddenly appeared with a handgun and pointed it straight at the referee.
As terrified players and match officials flee, the gunman can be seen dropping into a double-handed shooting crouch as if he is about to let fly.
Then he turns the gun on other players as they run around the pitch, trying to get out of the line of fire on the Santana Tlapaltitlan playing field.
Shouting, he points the gun at members of the crowd and aims at their faces as two teammates attempt to drag him away while he continues yelling.
Several men push each other around before one person falls to the ground and is kicked repeatedly.
Finally, teammates managed to bundle the gunman off the pitch, and the footage ends.
According to local media, the man later walked away as if nothing had happened.
No injuries were reported.
So far, the man has not been identified, and it is unclear whether a police complaint has been filed.
Police say they are investigating the footage.