With one big difference, your description sounds a lot like "All the Way Back", a short story by Michael Shaara, the Pulitzer prize winning author of The Killer Angels. Shaara's "All the Way Back", first published in Astounding Science Fiction, July 1952 (available at the Internet Archive), was the answer to this old question and this one and this one. The text of the story is available here.
If that's the story you're looking for, the book you read it in could be Shaara's collection Soldier Boy, or the anthology Galactic Empires or Galactic Empires Volume One (edited by Brian W. Aldiss), or Encounters or Monsters (edited by Isaac Asimov, Martin H. Greenberg, and Charles G. Waugh), or The World Turned Upside Down (edited by Eric Flint, Jim Baen, and David Drake).
In the short story, some human astronauts in space encounter some aliens.
The aliens ask them where they're from, and the astronauts happily tell them from Earth, and then where Earth is located, in the Milky Way Galaxy.
That's the part you remember wrong, if we're talking about the same story:
"It is surprising," Roymer went on, "that your home world is in the desert. We had thought that there were no habitable worlds—"
"Yes. The region of the galaxy from which you have come is that which we call the desert. It is an area almost entirely devoid of planets. Would you mind telling me which star is your home?"
"I'm afraid our government would not permit us to disclose any information concerning our race."
The aliens then tell them a story, about how long ago there was a huge intergalactic war, where all races had to come together to defeat one race that was incredibly brilliant but also bloodthirsty and vicious.
Yes, except that it wasn't intergalactic:
"The news of what happened to the Apectans set the Galactic peoples up in arms, but it was not until the Antha attacked a Federation world that we finally moved against them. It was the greatest war in the history of Life.
"You will perhaps understand how great a people the Antha were when I tell you that they alone, unaided, dependent entirely upon their own resources, fought the rest of the Galactics, and fought them to a standstill. As the terrible years went by we lost whole races and planets—like this one, which was one the Antha destroyed—and yet we could not defeat them.
The bloodthirsty race was ultimately defeated
"It was only after many years, when a Galactic invented the most dangerous weapon of all, that we won. That invention—of which only the Galactic Council has knowledge—enabled us to turn the suns of the Antha into novae, at long range. One by one we destroyed the Antha worlds. We hunted them through all the planets of the desert; for the first time in history the edict of the Federation was death, death for an entire race. At last there were no longer any habitable worlds where the Antha had been. We burned their worlds, and ran them down in space. Thirty thousand years ago, the civilization of the Antha perished."
but one of their ships got away and the aliens have been hunting the universe for their descendants for thousands of years. And those descendants are us, humans.
"Are you sure you got all of them?"
"No. Some surely must have escaped. There were too many in space, and space is without limits."
Jansen wanted to know: "Have any of them been heard of since?"
Roymer's smile left him as the truth came out. "No. Not until now."
The aliens tell the astronauts they're sorry but they have to kill them,
There were only a few more seconds. He gave them time to understand. He could not help telling them he was sorry, he even apologized. And then he sent the order with his mind.
The Antha died quickly and silently, without pain.
and then they're heading to earth to finish us off.
They would if they could, but:
The reports were on his desk and he regarded them with a wry smile. There was indeed no way to trace them back. They had no charts, only a regular series of course-check coordinates which were pre-set on their home planet and which were not decipherable. Even at this stage of their civilization they had already anticipated the consequences of having their ship fall into alien hands. And this although they lived in the desert.
[. . . .]
We can wait, he thought. Gradually, one by one, they will come out of the desert, and when they come we will be waiting. Perhaps one day we will follow one back and destroy their world, and perhaps before then we will find a way to save them.