The owner of the farm, who noticed a snake waiting for its prey, informed Forest Department officials, who reached the spot along with snake catchers.
Realising that it was a rare species, the catchers, from an NGO, caught the reptile and handed it over to the officials, department sources said.
Officials released the 10-foot long cobra into the dense forest region of Kallar near Mettupalayam, they said.