At one point during the 20-hour debate in the lower Chamber of Deputies, lawmaker Antonio Garcia of the leftist Party of the Democratic Revolution, who opposed the measure, stripped down to his underwear to symbolize the stripping of Mexico's oil wealth.
"This is how you're stripping the nation," he said in remarks quoted by the BBC.
"Where is the benefit? I'm not ashamed -- what you're doing is a shame!" he said.
Lawmaker Ricardo Monreal held a thermos at the lectern, saying it was a time capsule in which he would put the names of the "traitors of the fatherland" who voted for the reform bill.
Passage of the landmark legislation, pushed by President Enrique Pena Nieto, was met by cheers of "Mexico, Mexico" from proponents and chants of "traitors" and "treason" from critics.
Fistfights and other scuffles had broken out during the rowdy 20-hour session, several news outlets reported.
The session had to be moved to a small auditorium after opponents padlocked the deputies' normal chamber and blocked it with chairs in a bid to derail the vote, the Financial Times said.
Pena Nieto, who praised the passage as strengthening Mexico's "sovereignty and energy security," is expected to sign the Constitution-changing bill into law by February.
It must first be ratified by a majority of state legislatures, but that is widely seen as a formality.
Pena Nieto's Institutional Revolutionary Party controls a majority of the states.
The measure opens one of the world's biggest energy markets for the first time since 1938, when the Constitution was changed to put Mexican energy under exclusive control of state-run institutions.
Under the new measure, Mexico retains ownership of its oil and gas but lets private companies drill for it on their own or with state monopoly Petroleos Mexicanos, or Pemex, in exchange for sharing the profits.
The changes would open Mexico's estimated 115 billion barrels in reserves and 27 billion barrels of deep sea crude to oil giants such as ExxonMobil Corp., Chevron Corp., ConocoPhillips Co., BP PLC, Royal Dutch Shell PLC and France's Total SA.
Oil production in Mexico has dropped to 2.5 million barrels a day from 3.4 million barrels in 2004.
Foreign companies will also be allowed to open up gasoline stations, something long barred.
In addition, state-owned electric utility Comision Federal de Electricidad, Mexico's second most powerful state-owned company after Pemex, would let private power companies generate and sell electricity.
"This profound reform can lift the standards of living for all Mexicans," Pena Nieto said in a nationally televised address in August.
Polls show many Mexicans are skeptical of allowing private investment in the oil industry, not for nationalistic reasons but out of fear the country's oil wealth will be pilfered by corrupt companies and unscrupulous politicians, the Wall Street Journal said.