Evolution doesn't select against immortality in any specific case. How could it select against it in general?
Selecting against immortality itself would (in my view; apparently not in everyone's) be almost an oxymoron.
But there are other ways that shorter-lived variants might be preferred by selection. The major proposed ones have in common the idea of tradeoffs: that the genes for mortality at an old age also increase fitness at a young age more than enough to compensate. The mechanism might be e.g. investing a lot of energy into producing eggs, versus investing a lot of energy into building a durable long-lived body.
At a recent Reddit AMA, Eric Lander, a professor of biology who played an important part in the Human Genome Project, answered this question:
His response:
This seems to me, at first blush, to exhibit the Evolution of Species Fairy fallacy. Evolution doesn't work to benefit species, populations, or the "next generation". If a mutation arises that increases longevity, and has no other downsides, then animals with that mutation should become more common in the gene pool, because they die less often. I remember reading that the effect would not be very strong, because most animals don't die of old age. But why would there be the opposite effect?
I am loath to attribute a very basic error to a distinguished professor of biology. Is there another explanation? Is the claim that evolution selects for mortality true?
Note: Eric went on to add:
This seems to be blatant rationalization of a preconceived idea that death is good. (I doubt he truly believes that extra progress is worth everybody dying.) So perhaps his first statement is also a form of rationalization. But it seems improbable to me that he would make such a statement about biology if he didn't think it well-founded. More likely there's something I'm misunderstanding.
ETA: one of the first Google results is this page at nature.com, The Evolution of Aging by Daniel Fabian, which goes into some depth on the subject. The bottom line is that it agrees with my expectation that evolution does not select for mortality. Choice quotes:
How could a distinguished professor of biology, a leader of the HGP and advisor to the US President, get something so elementary wrong, when even a biology undergrad dropout like myself notices this seems wrong?
ETA #2: Gwern points to the Wikipedia article on Evolution of Ageing, which lists several competing theories of the evolution of aging (and therefore mortality). This shows the subject is more complex than I had thought and there may be good reason to believe mortality is selected for by evolution (or at least is reliably linked to something else that is selected).
I should be glad that I didn't discover an obvious error being committed by a distinguished professional, even if he may be ultimately wrong!