There were signs, subtle but unmistakable, that Hunter Biden’s high-stakes plea agreement with federal prosecutors might be on shaky ground hours before it went public in June, according to emails sent by his legal team to the U.S. attorney’s office in Delaware.

When one of Mr. Biden’s lawyers sent over the draft of the statement they intended to share with the news media, a top deputy to David C. Weiss, who had overseen the inquiry since 2018, asked to remove two words describing the status of the investigation, according to interviews and internal correspondence on the deal obtained by The New York Times. “Concluded” and “conclusion” should be replaced with the weaker “resolved,” the deputy said.

Six weeks later, the federal judge presiding over a hearing on the agreement would expose even deeper divisions and the deal imploded, prompting Mr. Weiss to seek appointment as special counsel with the freedom to expand the inquiry and bring new charges.

The deal’s collapse — chronicled in over 200 pages of confidential correspondence between Mr. Weiss’s office and Mr. Biden’s legal team, and interviews with those close to Mr. Biden, lawyers involved in the case and Justice Department officials — came after intense negotiations that started with the prospect that Mr. Biden would not be charged at all and now could end in his possible indictment and trial.