The trap was laid at Marodi near Belthangadi in the district last week, forest officials said.
The leopard had taken away a calf from the cattle shed of one Salam in Madla early this week and its half-eaten carcass was found in a nearby area the next day.
Forest officials used the carcass as the bait hoping that the leopard would return searching for it and the plan paid off, the sources said.