On being informed that a brothel was being run in the area, the two plainclothed policemen went to the spot.
However the accused identifed them as cops and stabbed both of them, Deputy Commissioner of Police (West Zone) V Satyanarayana said.
"The accused has been nabbed and identified as one Sudhakar. We are questioning him," the DCP told PTI.
The injured cops have been admitted to a local hospital, he said, adding that disciplinary action is being considered against the constables for going to the location without reinforcements.