ENLARGE Democratic presidential nominee Hillary Clinton greets a crowd in Pompano Beach, Fla., on Sunday. Photo: jewel samad/Agence France-Presse/Getty Images

As federal agents prepare to scour roughly 650,000 emails to see how many relate to a prior probe of Hillary Clinton ’s email use, the surprise disclosure that investigators were pursuing the potential new evidence lays bare building tensions inside the bureau and the Justice Department over how to investigate the Democratic presidential nominee.

Metadata found on the laptop used by former Rep. Anthony Weiner and his estranged wife Huma Abedin, a close Clinton aide, suggests there may be thousands of emails sent to or from the private server that Mrs. Clinton used while she was secretary of state, according to people familiar with the matter. It will take weeks, at a minimum, to determine whether those messages are work-related from the time Ms. Abedin served with Mrs. Clinton at the State Department; how many are duplicates of emails already reviewed by the Federal Bureau of Investigation; and whether they include either classified information or important new evidence in the Clinton email probe.

The FBI has had to await a court order to begin reviewing the emails, because they were uncovered in an unrelated probe of Mr. Weiner.

The new investigative effort, disclosed by FBI Director James Comey on Friday, shows a bureau at times in sharp internal disagreement over matters related to the Clintons, and how to handle those matters fairly and carefully in the middle of a national election campaign. Even as the previous probe of Mrs. Clinton’s email use wound down in July, internal disagreements within the bureau and the Justice Department surrounding the Clintons’ family philanthropy heated up, according to people familiar with the matter.

The latest development began in early October when New York-based FBI officials notified Andrew McCabe, the bureau’s second-in-command, that while investigating Mr. Weiner for possibly sending sexually charged messages to a minor, they had recovered a laptop with 650,000 emails. Many, they said, were from the accounts of Ms. Abedin, according to people familiar with the matter.

Those emails stretched back years, these people said, and were on a laptop that hadn’t previously come up in the Clinton email probe. Ms. Abedin said in late August that the couple were separating.

The FBI had searched the computer while looking for child pornography, people familiar with the matter said, but the warrant they used didn’t give them authority to search for matters related to Mrs. Clinton’s email arrangement at the State Department. Mr. Weiner has denied sending explicit or indecent messages to the teenager.

In their initial review of the laptop, the metadata showed many messages, apparently in the thousands, that were either sent to or from the private email server at Mrs. Clinton’s home that had been the focus of so much investigative effort for the FBI. Senior FBI officials decided to let the Weiner investigators proceed with a closer examination of the metadata on the computer, and report back to them.

At a meeting early last week of senior Justice Department and FBI officials, a member of the department’s senior national-security staff asked for an update on the Weiner laptop, the people familiar with the matter said. At that point, officials realized that no one had acted to obtain a warrant, these people said.

Mr. McCabe then instructed the email investigators to talk to the Weiner investigators and see whether the laptop’s contents could be relevant to the Clinton email probe, these people said. After the investigators spoke, the agents agreed it was potentially relevant.

Mr. Comey was given an update, decided to go forward with the case and notified Congress on Friday, with explosive results. Senior Justice Department officials had warned Mr. Comey that telling Congress would violate policies against overt actions that could affect an election, and some within the FBI have been unhappy at Mr. Comey’s repeated public statements on the probe, going back to his press conference on the subject in July.

The back-and-forth reflects how the bureau is probing several matters related, directly or indirectly, to Mrs. Clinton and her inner circle.

New details show that senior law-enforcement officials repeatedly voiced skepticism of the strength of the evidence in the bureau’s investigation of the Clinton Foundation, sought to condense what was at times a sprawling cross-country effort, and, according to some people familiar with the matter, told agents to limit their pursuit of the case.

ENLARGE New York mayoral candidate Anthony Weiner and his wife Huma Abedin attended a news conference in New York in 2013. Mr. Weiner had attempted to revive his career with a bid for New York City mayor, but that effort was doomed after a website published photos that he had evidently sent to another woman. Photo: eric thayer/Reuters

That led to frustrations among some investigators, who viewed FBI leadership as uninterested in probing the charity, these people said. Others involved disagreed sharply, defending FBI bosses and saying Mr. McCabe in particular was caught between an increasingly acrimonious fight for control between the Justice Department and FBI agents pursuing the Clinton Foundation case.

It isn’t unusual for field agents to favor a more aggressive approach than supervisors and prosecutors think is merited. But the internal debates about the Clinton Foundation show the high stakes when such disagreements occur surrounding someone who is running for president.

The Wall Street Journal reported last week that Mr. McCabe’s wife, Jill McCabe, received $467,500 in campaign funds in late 2015 from the political action committee of Virginia Gov. Terry McAuliffe, a longtime ally of the Clintons and, until he was elected governor in November 2013, a Clinton Foundation board member.

Mr. McAuliffe had supported Dr. McCabe in the hopes she and a handful of other Democrats might help win a majority in the state Senate. Dr. McCabe lost her race last November, and Democrats failed to win their majority.

A spokesman for the governor has said that “any insinuation that his support was tied to anything other than his desire to elect candidates who would help pass his agenda is ridiculous.”

Dr. McCabe told the Journal, “Once I decided to run, my husband had no formal role in my campaign other than to be” supportive.

In February of this year, Mr. McCabe ascended from the No. 3 position at the FBI to the deputy director post. When he assumed that role, officials say, he started overseeing the probe into Mrs. Clinton’s use of a private email server for government work when she was secretary of state.

FBI officials have said Mr. McCabe had no role in the Clinton email probe until he became deputy director, and by then his wife’s campaign was over.

But other Clinton-related investigations were under way within the FBI, and they have been the subject of internal debate for months, according to people familiar with the matter.

Early this year, four FBI field offices—New York, Los Angeles, Washington and Little Rock, Ark.—were collecting information about the Clinton Foundation to see if there was evidence of financial crimes or influence-peddling, according to people familiar with the matter.

Los Angeles agents had picked up information about the Clinton Foundation from an unrelated public corruption case and had issued some subpoenas for bank records related to the foundation, these people said.

The Washington field office was probing financial relationships involving Mr. McAuliffe before he became a Clinton Foundation board member, these people said. Mr. McAuliffe has denied any wrongdoing, and his lawyer has said the probe is focused on whether he failed to register as an agent of a foreign entity.

Clinton Foundation officials have long denied any wrongdoing, saying it is a well-run charity that has done immense good.

The FBI field office in New York had done the most work on the Clinton Foundation case and received help from the FBI field office in Little Rock, the people familiar with the matter said.

In February, FBI officials made a presentation to the Justice Department, according to these people. By all accounts, the meeting didn’t go well.

Some said that is because the FBI didn’t present compelling evidence to justify more aggressive pursuit of the Clinton Foundation, and that the career public integrity prosecutors in the room simply believed it wasn’t a very strong case. Others said that from the start, the Justice Department officials were stern, icy and dismissive of the case.

“That was one of the weirdest meetings I’ve ever been to,” one participant told others afterward, according to people familiar with the matter.

Justice Department officials told the FBI at the meeting they wouldn’t authorize more aggressive investigative techniques, such as subpoenas, formal witness interviews, or grand-jury activity. But the FBI officials believed they were well within their authority to pursue the leads and methods already under way, these people said.

About a week after Mr. Comey’s July announcement that he was recommending against any prosecution in the Clinton email case, the FBI sought to refocus the Clinton Foundation probe, with Mr. McCabe deciding the FBI’s New York office would take the lead, with assistance from Little Rock.

ENLARGE Director James Comey testified before the House Judiciary Committee in September on a variety of subjects including the investigation into former U.S. Secretary of State Hillary Clinton's email server. Photo: Win McNamee/Getty Images

The Washington field office, FBI officials decided, would focus on a separate matter involving Mr. McAuliffe. Mr. McCabe had decided earlier in the spring that he would continue to recuse himself from that probe, given the governor’s contributions to his wife’s former political campaign.

Within the FBI, the decision was viewed with skepticism by some, who felt the probe would be stronger if the foundation and McAuliffe matters were combined. Others, particularly senior officials at the Justice Department, felt that both probes were weak, based largely on publicly available information, and had found little that would merit expanded investigative authority.

According to a person familiar with the probes, on Aug. 12, a senior Justice Department official called Mr. McCabe to voice his displeasure at finding that New York FBI agents were still openly pursuing the Clinton Foundation probe, despite the department’s refusal to allow more aggressive investigative methods in the case. Mr. McCabe said agents still had the authority to pursue the issue as long as they didn’t use those methods.

The Justice Department official was “very pissed off,” according to one person close to Mr. McCabe, and pressed him to explain why the FBI was still chasing a matter the department considered dead. Others said the Justice Department was simply trying to make sure FBI agents were following longstanding policy not to make overt investigative moves that could be seen as trying to influence an election. Those rules discourage investigators from making any such moves before a primary or general election, and, at a minimum, checking with public integrity prosecutors before doing so.

“Are you telling me that I need to shut down a validly predicated investigation?” Mr. McCabe asked, according to people familiar with the conversation. After a pause, the official replied, “Of course not,” these people said.

For Mr. McCabe’s defenders, the exchange showed how he was stuck between an FBI office eager to pour more resources into a case and Justice Department leaders who didn’t think much of the case, one person said. Those people said that following the call, Mr. McCabe reiterated past instructions to FBI agents that they were to keep pursuing the work within the authority they had.

Mr. McCabe’s defenders in the agency said that following the call, he repeated the instruction that he had given earlier in the Clinton Foundation investigation: Agents were to keep pursuing the work within the authority they had.

Others further down the FBI chain of command, however, said agents were given a much starker instruction on the case: “Stand down.” When agents questioned why they weren’t allowed to take more aggressive steps, they said they were told the order had come from the deputy director—Mr. McCabe.

Others familiar with the matter deny Mr. McCabe or any other senior FBI official gave such a stand-down instruction.

For agents who already felt uneasy about FBI leadership’s handling of the Clinton Foundation case, the moment only deepened their concerns, these people said. For those who felt the probe hadn’t yet found significant evidence of criminal conduct, the leadership’s approach was the right response.

In September, agents on the foundation case asked to see the emails contained on nongovernment laptops that had been searched as part of the Clinton email case, but that request was rejected by prosecutors at the Eastern District of New York, in Brooklyn. Those emails were given to the FBI based on grants of partial immunity and limited-use agreements, meaning agents could only use them for the purpose of investigating possible mishandling of classified information.

Some FBI agents were dissatisfied with that answer, and asked for permission to make a similar request to federal prosecutors in Manhattan, according to people familiar with the matter. Mr. McCabe, these people said, told them no and added that they couldn’t “go prosecutor-shopping.”

Not long after that discussion, FBI agents informed the bureau’s leaders about the Weiner laptop, prompting Mr. Comey’s disclosure to Congress and setting off the furor that promises to consume the final days of a tumultuous campaign.

Write to Devlin Barrett at devlin.barrett@wsj.com