According to a report by the BBC, a 20 year old man in Bauchi received 20 lashes seven years after he stopped being gay.
A Nigerian man has received 20 lashes after an Islamic court in the northern city of Bauchi convicted him of homosexual offences.
Under Islamic law, courts can punish homosexual acts by stoning to death.
In Nigeria, homosexual acts are illegal under both Islamic and secular law and restrictions have been tightened.
Earlier this month, President Goodluck Jonathan signed into law a bill which bans same-sex marriages, gay groups and shows of same-sex public affection.
The new legislation applies throughout Nigeria.
Most states in the predominantly Muslim north of Nigeria have adopted Islamic law, known as Sharia, since the end of military rule in 1999.
Along with Mr Ibrahim, 11 other Muslims and a Christian man were arrested last month accused by the authorities of being homosexuals.
Mr Ibrahim told the BBC he was relieved that Judge Nuhu Muhammad had been lenient on him and had not sentenced him to death.
The BBC’s Ishaq Khalid was in court when Mr Ibrahim was lashed with a whip, made of animal skin smeared with oil.
Mr Ibrahim, who had pleaded guilty to the charge, was ordered to lie on a bench, and an official whipped his back in front of a packed courtroom, our correspondent says.
Mr Ibrahim screamed in pain while being lashed, but was able to walk afterwards, he adds.
The trial of two other men was adjourned to 23 January.
The fate of the nine other men arrested on the same charge is unclear but on Wednesday the Sharia Commission in Bauchi said the Christian would be tried by a “conventional court”, not an Islamic court.