The ad, from Working for Us PAC, which is supporting U.S. Rep. Donna Edwards, shows Obama growing emotional while discussing the Sandy Hook shooting in which 26 people were killed, including 20 children.
The ad then cuts to Edwards' opponent, Rep. Chris Van Hollen, to spotlight his support of the 2010 DISCLOSE Act, which was aimed at bringing greater transparency to campaign contributions from corporations, labor unions and other special interests.
The bill -- which did not pass -- included a major loophole exempting some major interest groups, including the National Rifle Association.
The super PAC ad references a 2010 Politico article
that said Van Hollen had "met twice with NRA chief lobbyist." Politico first reported
that the White House had asked the super PAC to pull the ad.
The White House does not typically get involved in Democratic primary races and a White House official said Obama had not yet endorsed anyone in the race. Obama had supported the DISCLOSE Act.
"On Tuesday, (White House political adviser) David Simas reached out to the Working For Us PAC and asked them to immediately take down the ad and stop using it going forward," White House Deputy Press Secretary Jen Friedman said.
"He made clear that the use of the President's image and statement in this context were misleading."
Working for Us PAC told CNN Wednesday that it would be removing Obama from the ad but that it stands by its accuracy.
"The ad speaks for itself. And it speaks to how Donna Edwards isn't a typical D.C. insider who compromises her values just to make a deal. We stand by the facts in this ad," Joshua Henne, a spokesman for Working For Us PAC, told CNN, adding later, "However, out of respect for the White House and the work they've done on this important issue, we will be taking President Obama out of the spot."
The Edwards campaign did not immediately respond to a request for comment. But Van Hollen's campaign slammed Edwards in a statement.
"This effort to scare and mislead voters is disappointing -- especially on an issue as important as gun violence, which is tearing at the fabric of Baltimore and communities across the state," the Van Hollen campaign said in a statement.
It added, "The attack ad uses President Obama's emotional plea to take action on gun violence prevention -- of course, it fails to mention that the President strongly supported the DISCLOSE Act. It's shameful that Edwards's backers would use President Obama to make false attacks on the issue of gun violence."