The Justice Department is expected to oust the head of the Bureau of Alcohol, Tobacco, Firearms and Explosives, according to people familiar with the matter, amid a troubled federal antitrafficking operation that has grown into the agency's biggest scandal in nearly two decades.

Moves toward the replacement of Kenneth Melson, acting ATF director since April 2009, could begin next week, although the precise sequence of events remains to be decided, these people said.

The shakeup shows the extent of the political damage caused by the gun-trafficking operation called Fast and Furious, which used tactics that allowed suspected smugglers to buy large numbers of firearms. Growing controversy over the program has paralyzed a long-beleaguered agency buffeted by partisan battles. The ATF has been without a Senate-confirmed director since 2006, with both the Bush and Obama administrations unable to overcome opposition from gun-rights groups to win approval of nominees.

In November, President Barack Obama nominated Andrew Traver, the head of the ATF's Chicago office, as permanent ATF director. The nomination stalled in the Senate after the National Rifle Association said Mr. Traver had a "demonstrated hostility" to the rights of gun owners.

Mr. Traver is set to travel to Washington on Tuesday to meet with Attorney General Eric Holder and Deputy Attorney General James Cole, the people said. The administration is weighing whether to name Mr. Traver as acting director or choose another interim chief while awaiting Senate action on his nomination, they said.

Bureau of Alcohol, Tobacco, Firearms and Explosives acting director Kenneth Melson. Associated Press

ATF spokesman Scot Thomasson said: "Acting Director Kenneth Melson continues to be focused on leading ATF in its efforts to reduce violent crime and to stem the flow of firearms to criminals and criminal organizations. We are not going to comment on any speculations."

Mr. Melson is the most senior official so far implicated in a congressional probe of the Fast and Furious operation. The ATF Phoenix office ran the program in 2009-2010 to monitor weapons purchases by suspected gun smugglers. Agency officials hoped eventually to build a case against major arms smugglers serving Mexican drug cartels. The ATF has struggled to stanch the flow of U.S. weapons to Mexican drug gangs.

At a House hearing this week, Rep. Darrell Issa (R., Calif.), chairman of the Oversight and Government Reform Committee, disclosed internal documents showing that Mr. Melson was closely involved in managing Fast and Furious operation. One email among ATF officials described Mr. Melson's request for an Internet link to hidden cameras the ATF had planted in gun shops cooperating with the operation, Mr. Issa said, citing the documents. That allowed Mr. Melson to watch a live feed of suspected "straw buyers," who purchase firearms on behalf of others, buying AK-47-style rifles, he said.

Mr. Issa and Sen. Chuck Grassley (R., Iowa) are leading the congressional probe of Fast and Furious, which came to light after an Arizona shootout in December that killed a U.S. border agent. Two assault weapons bought in a gun shop that was part of the operation were found at the scene. The shooter and the gun used to kill the agent haven't been identified. A Mexican national is charged in the shootout.

Republican lawmakers say the agency was "reckless" in running the program and should have known that at least some of the thousands of weapons would end up in Mexico or be used in crimes in the U.S.

The office of the Justice Department's inspector general is investigating the matter.

Fast and Furious has grown into the agency's worst crisis since the ATF's 1993 raid on a religious sect in Waco, Texas, which triggered a gunbattle that killed four ATF agents. The fallout from the raid and subsequent government assault on the sect's compound led to years of recriminations and investigations of the ATF.

The Fast and Furious operation caused dissent in the ATF Phoenix office, according to three ATF agents who testified at a House hearing Wednesday. The agents said they battled supervisors who insisted on doing surveillance instead of arresting suspected straw buyers.

Despite the Justice Department's internal probe, the hearing helped cement the view among top Justice Department officials that Mr. Melson needed to be moved out before pressure from lawmakers grew more intense, according to the people familiar with the matter.

Ronald Weich, assistant attorney general for legislative affairs, testified at this week's hearing but gave few details of the program. Mr. Weich said that if the investigation found "flawed strategies" or "insufficient surveillance of weapons," the responsible officials would be held to account.

The ATF is at the forefront of the government's efforts to stem the flow of what both the U.S. and Mexican governments say is a flood of U.S. arms to Mexican cartels. ATF agents say stopping that flow is often complicated by gun-owning traditions, particularly in border states, and laws that make it difficult to prosecute illegal weapons sales.

Gun-rights groups, which dispute that the U.S. is a major source of firearms trafficked to Mexico, have criticized ATF attempts to increase regulation of gun purchases. At the same time, the Obama administration has been under pressure from big-city mayors and others who favor tighter restrictions.

In a 2010 audit, the Justice Department inspector general criticized the ATF for pursuing too many small-buyer cases and not using its resources to find major gun traffickers.

It's unclear how the current controversy will affect the administration's chances of winning Senate confirmation for Mr. Traver. Mr. Traver is a 24-year ATF veteran investigator and former Navy officer. As the head of the ATF office in Chicago, he made a priority of pursuing gang cases. In particular, he focused on pursuing street gangs that had spread from urban areas into the suburbs, according to people who have worked with him.

Some ATF agents believe the scandal could help highlight how Congress's refusal to approve an ATF leader contributes to the agency's troubles.

White House spokesman Jay Carney, in response to questions Friday, said, "I can tell you that, as the president has already said, he did not know about or authorize this operation."

Write to Evan Perez at evan.perez@wsj.com and Devlin Barrett at devlin.barrett@wsj.com