Abdiaziz Abdinur Ibrahim, 27, and his interviewee were jailed in February after being convicted of offending state institutions.
In early March the woman was freed on appeal, but the journalist, who did not report the story, was held in jail.
The Supreme Court said on Sunday that charges against Abdiaziz Abdinur Ibrahim had been dropped.
Leaving court, Abdiaziz Abdinur Ibrahim said: “I’m very happy that I got my freedom back, I thank those who worked in this process that helped my release including my lawyers.”
The case prompted an outcry from human rights groups and journalists, who said it was politically motivated.
UN Secretary General Ban Ki-moon said he was “deeply disappointed”.
Both the woman and Abdiaziz Abdinur Ibrahim were originally given one-year jail terms.The woman had reported the alleged rape at a police station in Mogadishu and prosecutors alleged she and others had been paid by Abdiaziz Abdinur Ibrahim to lie.
She was convicted after the judge cited disputed medical evidence saying she had not been raped.
Abdiaziz Abdinur Ibrahim, who was detained in January, was accused by police of collecting material for an al-Jazeera media report on rape in camps for displaced people.
He had been working for Somali radio stations and international media but had not been involved in the story in question, the network said.
A new government backed by the UN came to power last September, after eight years of transitional rule.
Somali has seen more than 20 years of conflict which saw clan-based warlords, rival politicians and Islamist militants battle for control of the country.
U4c9jW1I5VAImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…