WASHINGTON—Central Intelligence Agency Director David Petraeus resigned after a probe into whether someone else was using his email led to the discovery that he was having an extramarital affair, according to several people briefed on the matter.

A Federal Bureau of Investigation inquiry into use of Mr. Petraeus's Gmail account led agents to believe the woman or someone close to her had sought access to his email, the people said.

Multiple...