The FBI and prosecutors in Florida and North Carolina began investigating the possibility of email hacking, because at least some of the emails sent by Ms. Broadwell to the other woman included contents of messages that appeared to come from Mr. Petraeus’s own account, these people said. The Justice Department and high-level officials, including Attorney General Eric Holder, were aware of the investigation for months, having to approve certain parts of the investigation.

Over the course of the probe, prosecutors realized there wasn’t a cyber-breach. Instead, Mr. Petraeus had shared some access to the account with Ms. Broadwell, possibly to exchange messages, these people said…

The investigation began this spring, and FBI agents interviewed Mr. Petraeus in the past two weeks. During that interview, Mr. Petraeus admitted the affair with Ms. Broadwell, who is also married, according to another person familiar with the case.