According to the complaint, the book contains "classified information".
The move comes a day after President Donald Trump said Mr Bolton could face "criminal problems" over the release.
The book, entitled The Room Where It Happened, is due to be released on 23 June.
"I will consider every conversation with me as president highly classified," Mr Trump told reporters on Monday. "So that would mean that if he wrote a book and if the book gets out, he's broken the law and I would think he would have criminal problems."
However, the non-profit American Civil Liberties Union said that "any Trump administration efforts to stop John Bolton's book from being published are doomed to fail".
Mr Bolton's lawyer, Charles Cooper, said they were looking through the lawsuit and "will respond in due course".
In January, the White House said the book contained "top secret" details that must be removed, although Mr Bolton rejected this.
However, claims reportedly contained in the manuscript - including that Mr Trump withheld military aid to pressure Ukrainian President Volodymyr Zelensky to start a corruption investigation into Democratic presidential hopeful Joe Biden and his son Hunter - formed a central part of the president's impeachment trial earlier this year.
The president denied the reports and Mr Trump was acquitted after a two-week trial in the Republican-controlled Senate, which did not include any witnesses.
Mr Bolton joined the White House in April 2018 and left in September the following year, saying he had decided to quit as national security adviser. President Trump, however, said he had fired Mr Bolton because he disagreed "strongly" with him. BBC