In Hanoi, under French colonial rule, a program paying people a bounty for each rat pelt handed in was intended to exterminate rats. Instead, it led to the farming of rats.
and
19th century palaeontologists traveling to China used to pay peasants for each fragment of dinosaur bone (dinosaur fossils) that they produced. They later discovered that peasants dug up the bones and then smashed them into multiple pieces to maximise their payments.
Rats had featured largely in the history of Ankh-Morpork. Shortly before the Patrician came to power there was a terrible plague of rats. The city council countered it by offering twenty pence for every rat tail. This did, for a week or two, reduce the number of rats—and then people were suddenly queing up with tails, the city treasury was being drained, and no one seemed to be doing much work. And there still seemed to be a lot of rats around.
Lord Vetinari had listened carefully while the problem was explained, and had solved the thing with one memorable phrase which said a lot about him, about the folly of bounty offers, and about the natural instinct of Ankh-Morporkians in any situation involving money: “Tax the rat farms.”
From the Wikipedia article about perverse incentives:
and
[context added]
-- Soul Music, by Terry Pratchett
Needs more context.