Aliyu Sa'ad, 25, who admitted calling his friend gay in court on Thursday, was sentenced to be detained in custody by a Sharia court in Kano State.
After Sa'ad entered a guilty plea, the judge, Malam Umar Lawal-Abubakar, issued the directive.
The case was postponed to July 3 for a summary trial by Lawal-Abubakar.
Insp. Abdullahi Wada, the prosecution's attorney, earlier informed the court that the defendant committed the crime on Monday at around 8 p.m.
In addition, Wada claimed that during an altercation, the defendant called Malam Ahmed Khamis-Ahmed, the complainant, unprintable terms.
The prosecution claimed that the offense was against Kano State's Sharia law, namely Section 188.