Judge N Ananda Rao passed the ruling against inspector Paila Nityananda Rao Babu and sub-inspector Shaik Khadervalli, both posted at Anakapalli station in the district, yesterday.
They will also have to pay a fine of Rs 15,000 each, a release from CBI said.
The accused had demanded a bribe of Rs 30,000 from a person for releasing his brother from custody.
They were caught while taking Rs 12,150, reminder of the amount, on January 23, 2010, at Anakapalli station.