Soltani, a colleague of Shirin Ebadi, the Nobel laureate, was arrested a year ago while defending two people accused of spying on Iran's nuclear programme.
The judiciary said he had shared confidential case details with outsiders.
Soltani said: "I have been cleared of spying charges, but received four years for disclosing confidential documents and one year for propaganda against the system.
"Neither my lawyers or I were called for the court session mentioned in the verdict.
"We were unable to defend my case because we never saw the main evidence listed in the indictment."
He also said that in Iran, "most of the important, political cases" were subject to a "behind the scenes will for such cases to have a certain fate."
After his arrest last July, Soltani spent more than seven months behind bars, of which he said 43 days were in solitary confinement.
He was granted bail of one billion rials ($109,000) in March.
Soltani, a member of Ebadi's Defenders of Human Rights Centre, has taken on a series of high-profile cases.
He represented journalist Akbar Ganji, one of the country's most prominent dissidents, as well as the family of Iranian-Canadian photographer Zahra Kazemi, who died in custody in Iran in 2003.