Some of Silicon Valley’s biggest names are threatening to leave the U.S. Chamber of Commerce over a bill that would make Web companies liable for pirated content that appears on their sites.

Last month, Yahoo quietly quit the powerful business trade group, which supports the legislation. Google and the Consumer Electronics Association, which represents 2,200 firms, are warning they may do the same.

“Given the fact that their mission is to grow the American economy, sponsoring legislation that would harm one sector that is perhaps the brightest spot of the economy is short-sighted,” said CEA senior vice president Michael Petricone. “It makes one wonder what their membership will be like in the future.”

When asked whether CEA would drop its membership, he replied: “We are comfortably reassessing groups we are members of.”

Spats between the Chamber and its members rarely spill out into public view. And it’s unclear how an exodus of technology firms would impact the lobbying group’s considerable weight in Washington. The group does not disclose the names of its members, many of whom pay substantial amounts for the Chamber’s lobbying prowess.

The legislation could punish Web firms if copyrighted movies, songs or software appear on their sites. But it would address long-standing concerns from Hollywood studios, record labels and publishing houses, which lose $135 billion in revenues each year from piracy and counterfeiting, according to Chamber estimates.

The Chamber would not comment specifically on the decisions of individual members. But it argued that the proposals moving through the House and Senate would improve the quality of media content online and thus benefit Web firms.

“This is a common-sense way forward that is good for the whole industry,” said Steve Tepp, chief counsel on intellectual property for the Chamber’s Global IP Center.

Many Silicon Valley companies agree that piracy is a problem but say the legislation goes too far. Web giants including Facebook, Google, Yahoo, Linked­In, eBay, and Mozilla on Tuesday co-wrote a letter to Senate and House lawmakers urging Congress to reconsider the measures. They fear the proposals would invite lawsuits and empower law enforcement to shut down their operations if a copyrighted movie or song appeared on their sites without their authorization.

The House Stop Online Piracy Act, introduced by Rep. Lamar Smith (R-Tex.), will be debated in a House Judiciary Committee hearing Wednesday. A similar bill introduced by Sen. Patrick J. Leahy (D-Vt.), with 40 co-sponsors, was approved by the Judiciary Committee in September.

Novelist Lisa Scottline, author of “Look Again” and dozens of other titles, said new laws are necessary because current enforcement isn’t preventing illegal copies of her work from being exchanged on the Web.

“It’s appallingly easy and makes it very difficult for any writer trying to make it,” she said.

Opponents of the measures say the new law should protect Web firms that do their best to remove illegal content. And as the bills move closer to approval, Silicon Valley companies have ramped up their lobbying efforts. Investors in companies such as Twitter and Foursquare have recently come to Washington to try to persuade lawmakers to vote against the legislation.

“This is an issue every Web company has to care about, and Google cares about any issue that threatens the nature of the Internet and how it operates,” said a person familiar with Google’s thinking, who spoke on the condition of anonymity because of the ongoing debate involving the bill. The person added that Google is “considering options” that could include canceling its membership with the Chamber.

A Yahoo spokeswoman declined to comment on its decision to cancel its membership with the Chamber. People familiar with the company’s thinking say the Chamber’s advocacy of anti-piracy laws was the final straw in a series of decisions that didn’t benefit the firm. They spoke on the condition of anonymity because of Yahoo’s business relationships with current Chamber members.

Facebook is a member of the Chamber but declined to comment about the group’s position. Twitter is not a member.