Chelsea Manning, the former Army intelligence analyst who provided secret military documents to WikiLeaks in 2010, was released from jail Thursday after being held for two months for refusing to testify before a grand jury investigating the online leak-publishing organization.

Ms. Manning’s release came on the day that the term of the grand jury that served her with a subpoena in January expired and the grand jurors were dismissed, said Moira Meltzer-Cohen, her lawyer. Ms. Manning, 31, was held for 62 days.

But she may return to jail as early as next week. Her lawyer said Ms. Manning was served with a new subpoena on Wednesday to appear before a different grand jury on May 16, where she is expected to be asked “the same questions” about WikiLeaks. Ms. Manning will appear before the new grand jury but will not answer its questions, her lawyer said.

Prosecutors had granted immunity to Ms. Manning for her testimony, but when she appeared before the grand jury in March she responded to each question by saying that it violated her constitutional rights. Judge Claude H. Hilton of Federal District Court in the Eastern District of Virginia held her in contempt and ruled at the time that she remain in custody until she testified.