Mr. Sowore still faces trial on charges of treason, money laundering and “cyberstalking” — the last for allegedly insulting the president, Muhammadu Buhari, on television. His bail conditions stipulate that he may not leave the Nigerian capital, Abuja, or speak to the press, but that did not stop him from giving a short statement after his release.

Six members of the United States Congress had appealed to the Nigerian attorney general on behalf of Mr. Sowore, who lives in New Jersey with his wife and children but whose work focuses on exposing corruption and government malfeasance in Nigeria.

His wife, Opeyemi Sowore, said that she was grateful for his release, but that her family was still praying for the “holiday miracle” of his return home to Haworth, N.J., where the family’s neighbors have campaigned for the Nigerian authorities to free him.

“My No. 1 concern is for his safety,” Ms. Sowore said. “We remain resolute on Yele being cleared of all baseless charges,” she added, using the short form of Omoyele

Senator Robert Menendez of New Jersey said that he was gratified to hear of Mr. Sowore’s release, but that he and Representative Josh Gottheimer, also of New Jersey, would watch Mr. Sowore’s case closely.