The guilty verdict was read against the 27-year-old mother who reported being attacked months ago while living in a displaced people's camp in Mogadishu.
Judge Ahmed Adan Fareh said the woman was accused of insulting a government body and making false claims.
The court sentenced to her one year in prison after the judge said she was unable to show any evidence proving she had been raped.
Ilwad Elman, spokesperson for Sister Somalia, a sexual violence crisis centre in Mogadishu
The judge said she should begin serving her time in a couple of years, when she is no longer breastfeeding her child.
Abdiaziz Abdinur, a journalist who allegedly interviewed the woman, was also sentenced to a year in prison.
Both had been accused of fabricating the story in an attempt to make money and were charged with insulting the country's honour.
The international outcry surrounding the case is an embarrassment for Somali President Hassan Sheikh Mohamud, whose election last year was described by the international community as the start of a new era for Somalia after decades of instability and conflict.
The trial started as Mohamud toured Europe to garner international support to rebuild Somalia.
He was in Britain on Monday where he met International Development Secretary Justine Greening.
Human rights groups claim the trial is politically motivated and an attempt to cover up widespread sexual abuse of women.