Samuel Ogundipe, a journalist with the independent online newspaper Premium Times, has been in custody since his arrest on Tuesday after reporting on a takeover of parliament last week by masked security agents.
Premium Times said Ogundipe was brought before a magistrate's court in Kubwa, Abuja on Wednesday without the knowledge of his lawyers.
"They brought me to a magistrate court in Kubwa where they arraigned me. The magistrate said they should detain me for five days," Ogundipe was quoted as telling his editor on the phone.
"They accused me of criminal trespass. They said I stole secret documents. The magistrate does not know the details, because they did not include in the charge that I am a journalist. I was not allowed to contact my lawyers," he said.
"They also did not allow me to call anyone until the magistrate ordered them to let me make one call," he added.
National police spokesman Moshood Jimoh confirmed the arraignment.
Ogundipe will be remanded in custody until August 20 for another hearing, he said.
Two other colleagues arrested with Ogundipe on Tuesday were released after questioning.
Premium Times said Ogundipe was being held for publishing a report sent to acting president Yemi Osinbajo by the inspector general of police, Ibrahim Idris, on events that took place at the National Assembly on August 7.
Masked armed operatives of the State Security Service (SSS) blocked access to the Senate and House of Representatives, preventing lawmakers from entering workers, journalists and other visitors from entering.
No official reason was given for the siege but independent sources speculate it was heavy-handed political manoeuvering ahead of presidential and parliamentary elections next February.
The Nigerian Union of Journalists, local and international rights bodies have called for Ogundipe's immediate release.
Journalists are frequently threatened in Nigeria, a country that was under military rule for decades before becoming a democracy almost 20 years ago.
Jones Abiri, another Nigerian journalist, was detained for two years without trial over allegations he was linked to militants in the oil-rich Niger delta.
After a public outcry he was finally arraigned in an Abuja court this week.
Abiri, the publisher of Weekly Source magazine, is due to appear in an Abuja court on Friday for a hearing.