The measure approved Thursday requires companies with more than 10,000 Maryland employees to spend at least 8 percent of their payroll on employee health care or pay the difference into the state-supported Medicaid program. Of the state's large employers, only Wal-Mart spends less than 8 percent on health care.
Labor unions, who heavily pushed for the bill, said they would pursue similar legislation in at least 30 other states, focusing first on Colorado, Connecticut and Washington.
"The tide is turning because working people are not just fed up they are ready to get active to set our country in a different direction, one state at a time," AFL-CIO President John Sweeney said in a statement.
Maryland's Democratic-controlled Legislature overrode a veto by Republican Gov. Robert Ehrlich.
Critics of the legislation called it a dangerous precedent that ultimately would cost Maryland jobs.
The company employs about 17,000 Maryland residents at more than 40 Wal-Mart and Sam's Club stores, and about 1.3 million people nationwide.
A Wal-Mart executive called the bill a poorly worded mandate for a single company. Mia Masten, a director of corporate affairs, said the bill "could be the beginning of a slippery slope."
"We believe everyone should have access to affordable health insurance, although this legislation does nothing to accomplish that," said Masten, who said the retailing giant may partially pull out of the state if the bill becomes law.
She said Wal-Mart was unfairly singled out because of "partisan politics" and that Medicaid's problems go beyond the behavior of one company.
"This does nothing to accomplish this goal of providing everyone access to affordable health care insurance," said Sarah Clark, a spokeswoman for the Bentonville, Ark.-based company.
A spokesman for Ehrlich said the governor was disappointed in the vote and that it may put in jeopardy a planned Wal-Mart distribution center slated for Maryland's Eastern Shore.
Clark also hinted that the distribution center may not open as planned because of the vote. "This certainly gives us pause to sit back and look at the situation," she said.
The veto override had been one of the session's most intensely lobbied, with business groups taking out print ads supporting a veto and labor groups rallying and taking out their own ads siding with supporters.
The decision is being closely watched by labor unions and legislatures around the country.
"We expect that today's vote will generate important momentum in many other state legislatures," said Nu Wexler, a spokesman for Washington-based Wal-Mart Watch, which is funded by a union.
Some Maryland Democrats had harsh words for Wal-Mart.
"Don't dump your employees that you refuse to insure into our Medicaid system," said the bill's sponsor, Sen. Gloria Lawlah.
In the House, Delegate Anne Healey compared Wal-Mart to a schoolyard bully. "We're here to tell this bully to change his behavior," she said.
But House Republican Leader George Edwards called the measure an unwarranted intrusion into private enterprise. "If you don't want to work for Wal-Mart, no one's twisting your arms. Go somewhere else and work," Edwards said.
The company faces legal pressure nationwide.
In Pennsylvania, a judge this week approved a class-action lawsuit by employees who say the company pressured them to work off the clock. Last month, a California jury awarded workers $172 million for illegally denied lunch breaks, and Wal-Mart settled a similar Colorado case for $50 million.
The company is appealing the California verdict and may pursue an appeal of the class-action certification in Philadelphia.