A collection of labor and community groups filed a complaint with the Internal Revenue Service accusing Wal-Mart Stores' charitable foundation of violating its tax exempt status urban areas.
In the complaint, dated Monday and addressed to IRS Commissioner John Koskinen, the group claims the Walmart Foundation made donations to ease public opposition as it sought to expand in key markets like Los Angeles and New York.
Wal-Mart spokesman Kevin Gardner said the company takes IRS regulations "very seriously" and the complaint lacked merit.
The group claimed donations spiked around efforts to open stores in a community. For example, it said donations in Los Angeles jumped to $1.4 million in 2011 as plans for a new store in Chinatown gathered steam before dropping off to $230,000 in 2013, the year it opened, the complaint said.
The complaint alleges the foundation violated IRS regulations by acting in the interests of a private company and not solely for charitable aims.
It was signed by 13 groups, including long-time critics like the union-backed New York Communities for Change which has been active in pushing for higher worker pay and has campaigned against the opening of Wal-Mart stores.
"It's sad that groups aligned with professional critics of Walmart, who are more interested in advancing their own narrow agenda, are ignoring the millions of people who've benefited from the good works of the Walmart Foundation over many years," Wal-Mart's Gardner said in a statement.
Last year Wal-Mart and the foundation gave $1.4 billion in cash and in-kind donations.
Read MoreTraders bet onWal-Mart rally
In recent years Wal-Mart has targeted urban areas for growth as it invests in smaller-format stores. But it has faced public opposition in cities where community groups fret over the potential impact on wages and competition with local stores.
In the 22-page complaint the group also claimed that Wal-Mart was only soliciting applications from groups that did not put the company in a negative light.
Phil Hackney, a LSU law professor who previously worked as an IRS attorney dealing with tax-exempt organizations, said the group would likely struggle to prove the merits of their complaint.
"Plenty of large businesses set up foundations and they are going to invest in the community in which they operate. You are just running in an uphill battle to make the claim that this is somehow out of the ordinary and different," he said.