Prosecutors claimed in the charge sheet, that Aminu Mohammed Mohammed posted a photo of Aisha buhari and wrote in Hausa language words that roughly translated into accused her of embezzlement.
The prosecution accused the young man of spreading false information.
His lawyer claimed that he did not deny a defamation charge during his court appearance.
The final exams for the undergraduate are due to begin Monday.
He is still being held in detention so it is uncertain if he can do this.
Chijioke Kingley Agu, his lawyer, stated to BBC that he had made a bail application and hoped this would go through within 48 hours.
The parents of Mr Mohammed have publicly asked Mrs Buhari for forgiveness. She and the authorities are yet to comment on the matter.
Mohammed was reported to have been arrested earlier this month. However, he only appeared in court Tuesday.
Prosecutors said that the rough English translation from the Hausa phrase in his Tweet was “Mama has embezzled money meant for the weak”.
If convicted, Mohammed may be sentenced to up to two years in prison.
He is currently studying environment management at Federal University in Jigawa, the northern state. His classmates described him as a brilliant student.
Social media users and rights activists have condemned the Nigerian authorities’ treatment for the student and called to his immediate release.
Some claim that Nigerian officials have become more tolerant of criticism.
Two TikTok users aged 16 and 17 were fined and jailed in public earlier this month after being found guilty by a court of defaming Kano’s governor in a clip posted to social media.
Nigeria is set to hold elections on February 2, when President Buhari will be retiring at the conclusion of his second term.