In game theory, there're numerous games that fit OP's description well including those in Talia Ford's and benshepherd's answers. But, in essence, it's just a multiple-player version of prisoner's dilemma.
Another celebrated(and discredited) example that fits equally well is the paradox of thrift. Suppose that an unfavorable shock hits the economy. An individual will be better off by saving more and spending less unilaterally, provided all others don't adapt their spending behaviour. However, if everyone save more in unison( and they have incentive to do so), everyone will be worse off compared to the utility level that they don't.
As far as I know, in Paul Samuelson's Economics(10ed), paradox of thrift is chosen as a notorious example of fallacy of composition. Thus maybe fallacy of composition is the word you are after.
If you are looking for a single word, I guess it could be emergence, though I'm not absolutely sure.
Added: This is an attempt to show why prisoner's dilemma is significant in the philosophical ground. At sometime in our life, in one form or another, we heard of some maxims with a philosophical flavor, say, "People are better off when making their own choices"(Milton Friedman), "The road to economic meltdown is always and everywhere paved by governments' good intentions"(Austrian School), "That government is best which governs not at all", "People pursuing their self-interest are guided by the invisible hand" These dogmas, or widespread misuses of them, though inherently appealing for us, freemen, are debunked by the simple equilibrium analysis of prisoner's dilemma. The lesson is that it's an oversimplication to believe that individual incentive always coincides with social incentive.