Looking for the title of an old sci-fi book,
Not a book, a short story: "Stars, Won't You Hide Me?" by Ben Bova, first published in Worlds of Tomorrow, January 1966, available at the Internet Archive. The title is from the song "Sinner Man" which is quoted in the story; I believe the quotations are from the 1956 Les Baxter version, which is available on YouTube.
pretty sure it is a Baen or Del Rey imprint.
It doesn't seem to have appeared in a Baen or Del Rey collection. Does any of these covers look familiar?
Basically, mankind has reached the stars and expanded throughout the galaxy. Suddenly, an unknown race appears and begins a war of extermination against man.
The Final Battle had been lost. On a million million planets across the galaxy-studded universe, mankind had been blasted into defeat and annihilation. The Others had returned from across the edge of the observable world, just as man had always feared. They had returned and ruthlessly exterminated the race from Earth.
It had taken eons, but time twisted strangely in a civilization of light-speed ships. Holman himself, barely thirty years old subjectively, had seen both the beginning of the ultimate war and its tragic end. He had gone from school into the military. And fighting inside a ship that could span the known universe in a few decades while he slept in cryogenic suspension, he had aged only ten years during the billions of years that the universe had ticked off in its stately, objective time flow.
Finally, the galaxy is desolate, and one man remains.
Holman's mind pictured the blood-soaked planets he had seen during his brief, ageless lifetime of violence. His thoughts drifted back to his own homeworld, his own family: gone long, long centuries ago. Crumbled into dust by geological time or blasted suddenly by the overpowering Others. Either way, the remorseless flow of time had covered them over completely, obliterated them, in the space of a few of Holman's heartbeats.
All gone now. All the people he knew, all the planets he had seen through the ship's electroptical eyes, all of mankind . . . extinct.
He is in a starship with an AI and becomes injured in the battle.
The man has not been injured physically. His ship has been damaged:
The ship was hurt, and Holman could feel its pain. He lay fetal-like in the contoured couch, his silvery uniform spider-webbed by dozens of contact and probe wires connecting him to the ship so thoroughly that it was hard to tell where his nervous system ended and the electronic networks of the ship began.
Holman felt the throb of the ship's mighty engines as his own pulse, and the gaping wounds in the generator section, where the enemy beams had struck, were searing his flesh. Breathing was difficult, labored, even though the ship was working hard to repair itself.
The ship's AI takes over and speeds out into the unknown, followed by the last remaining member of the unknown alien race.
SELF-PROTECTION MECHANISMS INCLUDE THE CAPABILITY OF PREVENTING THE HUMAN COMPONENT OF THE SYSTEM FROM IRRATIONAL ACTIONS. A series of clicks and blinks, then: IN LIEU OF SPECIFIC COURSE INSTRUCTIONS, A RANDOM EVASION PATTERN WILL BE RUN.
[. . . .]
Holman slept as the ship raced at near-lightspeed in an erratic, meaningless course, looping across galaxies, darting through eons of time. When the computer's probings of Holman's subconscious told it that everything was safe, it instructed the cryogenics system to reawaken the man.
As all speeds are at tremendous multiples of the speed of light, the man cannot get away, but the alien cannot catch up.
Relativistic, not FTL:
He knows what is following him. Their words echoed in his brain. Are the Others following me? Have they picked up my trail? They must have. They must be right behind me.
He could feel the cold perspiration start to trickle over him.
"But they can't catch me as long as I keep moving," he muttered. "Right?"
CORRECT, said the computer, flashing lights at him. AT A RELATIVISTIC VELOCITY WITHIN LESS THAN ONE PERCENT OF LIGHTSPEED, IT IS IMPOSSIBLE FOR THIS SHIP TO BE OVERTAKEN.
"Nothing can catch me as long as I keep running."
Finally, communication is opened, at which point the man asks "why?" The alien tells him that man had discovered immortality, but that it required the death of a member of a race known as the Flower People for every human who achieved immortality. The alien says that Man would have found the answer eventually,
That revelation comes, not from the enemy Other, but from a neutral Observer:
Your knowledge of the truth is imperfect. Mankind could have achieved immortality in time. Most races evolve that way eventually. But you were impatient. You stole immortality.
"Because we did it artificially, with chemicals. That's stealing it?"
Because the chemicals that gave you immortality came from the bodies of the race you called the Flower People. And to take the chemicals, it was necessary to kill individuals of that race.
Holman's eyes widened. "What?"
For every human made immortal, one of the Flower Folk had to die.
but that genocide was so intolerable that the aliens came from another dimension, to which they could never return, to stop Man, which resulted in the war of extermination.
The pursuing enemy speaking now:
You can flee to the ends of the universe to no avail.
You have forced us to leave our time-continuum. We can never return to our homeworlds again. We have nothing to do but pursue you. Sooner or later your machinery will fail. You cannot flee us forever.
Finally, the light speeds become so great that the two remaining living beings in the universe approach the Big Crunch.
The galaxies were clustering in now, falling in together as though sliding down some titanic, invisible slope. The universe had stopped expanding eons ago, Holman now realized. Now it was contracting, pulling together again. It was all ending!
He laughed. Coming to an end. Mankind and the Others, together, coming to the ultimate and complete end of everything.
As the Man begins to dive into the singularity, with the alien hot on his heels, he says that maybe there will be room in the next universe for both races to live in peace, and the final line is "not with a whimper, but with a roar of triumph"!
"The end of the world. The end of everything and everybody. We finish in a tie. Mankind has made it right down to the final second. And if there's another universe after this one, maybe there'll be a place in it for us all over again. How's that for laughs?"
The world ended.
Not with a whimper, but a roar of triumph.