lucre
Money or profit gained in a greedy or shameful way.
Lucre is money or profit, especially when it's gotten in a way that seems greedy or shameful. The word almost always appears in the phrase filthy lucre, which makes the distaste even clearer: it's profit that feels dirty or tainted because of how someone earned it.
When a character in a story is motivated by “filthy lucre,” they care more about getting rich than about doing what's right. Imagine a landlord who won't fix broken heaters in winter because repairs would cut into profits, or a merchant who sells spoiled food to make a quick buck. Their pursuit of lucre matters more to them than treating people fairly.
Over time, the word picked up a negative feeling. When you read about someone chasing lucre, the writer is telling you something important: this person values money over integrity. A scientist who falsifies research results for grant money, or a lawyer who takes on cases they know are unjust because they pay well, might be accused of being motivated by lucre.
You'll rarely hear someone say “I'm working for lucre” because the word itself carries judgment. People might work for money, earnings, income, or profit, but lucre suggests something's gone wrong in how they earn it.