Such an order was passed by the US District Judge Emmet G Sullivan as part of a lawsuit filed against Clinton by Judicial Watch, which had sought permission to question the former secretary of state under oath and in person.
This was, however, denied by the court.
Judge Sullivan said the court is persuaded that Secretary Clinton's testimony is necessary to enable her to explain on the record the purpose for the creation and operation of the clintonemail.Com system for State Department business.
"We will move quickly to get these answers. The decision is a reminder that Clinton is not above the law," he said.
More From This Section
The court also asked the state department to release all remaining documents responsive to Judicial Watch's Freedom of Information Act request by September 30.
Judicial Watch may serve interrogatories on Clinton by October 14. Clinton's responses need to be within thirty days, the order said.
"Judicial Watch will get Clinton under oath regarding the set-up of her outlaw server - something no other person, organisation or agency has been ableto do, to date. We believe it is a victory for law and order to get Hillary Clinton under oath answering questions about the server setup and why she did it," said Judicial Watch director of investigations Chris Farrell.
"Judicial Watch is a right-wing organization that has been attacking the Clintons since the 1990s," said Brian Fallon, the spokesman of the Clinton Campaign.
"This is just another lawsuit intended to try to hurt Hillary Clinton's campaign, and so we are glad that the judge has accepted our offer to answer these questions in writing rather than grant Judicial Watch's request," he said.