A Justice Department investigation into whether former Trump national security adviser John Bolton criminally mishandled classified information in a White House memoir published this June has reached a federal grand jury, according to two people familiar with the matter.

A grand jury issued subpoenas for records, including from Simon & Schuster, the publisher of Bolton’s book, “The Room Where it Happened,” the people said.

The book recounts Bolton’s 17 months as President Trump’s top national security official and paints a withering portrait of Trump as an “erratic” and “stunningly uninformed” leader. The Trump administration unsuccessfully sought to block the book’s release in June, saying it contained classified information that wasn’t properly reviewed before publication.

Bolton, a veteran diplomat and security expert, has denied the book contains classified information, cited his cooperation with a lengthy pre-publication review and added that he brought decades of experience working with secret material to the task.

In a statement, Bolton’s lawyer, Charles J. Cooper, said his team was aware of reports that subpoenas had been issued.

“Ambassador Bolton emphatically rejects any claim that he acted improperly, let alone criminally, in connection with the publication of his book, and he will cooperate fully, as he has throughout, with any official inquiry into his conduct,” Cooper said.

A spokesman for Simon & Schuster declined to comment.

The grand jury case was opened after a federal judge rejected the Justice Department’s emergency request to block the book’s June 23 publication, said the people, who spoke on the condition of anonymity to freely discuss the matter. The New York Times first reported on the grand jury subpoenas.

The Justice Department had requested a restraining order on the book, arguing Bolton breached a contract with the government by not completing a required national security review for classified information.

In a June 20 ruling, U.S. District Judge Royce C. Lamberth of the District of Columbia denied the Trump administration’s request, citing the publisher’s declaration that more than 200,000 copies had already shipped.

However, in an opinion in the government lawsuit seeking financial damages, the judge said Bolton “exposed his country to harm and himself to civil (and potentially criminal) liability” in further litigation.

A Justice Department spokeswoman declined to comment.

Another person familiar with the case said department officials pursued the case as soon as details of the book began appearing in public, but the effort gained added momentum with Lamberth’s written ruling.

Opening a grand jury case and issuing subpoenas is one of many early steps in an investigation, and leak investigations in particular can be lengthy. Most submissions to the Justice Department for leak cases are not forwarded to prosecutors for investigation, and most of such investigations do not result in charges, said one person familiar with the matter.

In Bolton’s case, assessing his intentions, the government’s handling of the classification review and the dispute’s political aspects adds further complexity.

In pre-publication litigation, the government disclosed that national security adviser Robert C. O’Brien, whom Trump appointed to succeed Bolton, ordered an additional review of Bolton’s book after a career National Security Council staffer said he had completed required edits.

Gen. Paul M. Nakasone, director of the National Security Agency, also declared in a court affidavit that a limited portion of the draft manuscript “implicates” information classified at the highest level. He said the “compromise of this information could result in the permanent loss of a valuable [signal intelligence] source and cause irreparable damage to the U.S. [signal intelligence] system.” Such intelligence is derived from electronic systems used by foreign targets, such as communications systems, radars and weapons systems.

Bolton has alleged that a career White House official, Ellen Knight, effectively cleared his manuscript in April before Trump political appointees tried to stall it through the presidential election in November. Cooper argued that Trump appointees politicized the clearance process in a manner that, if allowed to stand, would keep future officials from speaking out when they leave government.

Among other disclosures, the Bolton memoir states that Trump asked Chinese President Xi Jinping to help him win reelection, asserts Trump attempted to use military aid to pressure Ukraine on political investigations, and says Trump expressed willingness to halt or obstruct criminal investigations as personal favors to authoritarian foreign leaders.

Bolton in promotional interviews called Trump incompetent and “unfit for office.”

Trump has responded on Twitter saying he hoped Bolton would be investigated. Trump said Bolton “broke the law” and should be in jail and have money seized “for disseminating, for profit, highly Classified information.” He also has called Bolton a “Wacko” and his memoir “a compilation of lies and made up stories, all intended to make me look bad.”

In a June court hearing, Deputy Assistant Attorney General David M. Morrell acknowledged to the judge that he knew of no precedent in which high-level officials intervened in classification reviews.

O’Brien tapped another new appointee, Michael Ellis — a former aide to Rep. Devin Nunes (R-Calif.) — to conduct the additional review. Ellis, the National Security Council’s senior director for intelligence, was not officially trained on his classification authority until the day after he completed the Bolton manuscript review, the government acknowledged.

However irregular the re-review, Morrell said, it was “entirely appropriate” given “an extraordinary set of facts” — a former national security adviser detailing ongoing policy matters during the same administration in which he served.

Lamberth said it appeared that Bolton failed to complete a pre-publication review and obtain written authorization that the book contained no classified information.

In a Sept. 8 interview with The Post, Attorney General William P. Barr echoed that criticism and voiced disapproval of Bolton writing about administration officials while they are still in office.