Copying from a Reddit post last year where someone looked for the same:
"...book where the human race made contact with a galactic race, part of a group of civilizations in the galaxy. Earth wanted to join, but is kicked out because of their aggressiveness and inclination for violence. Earth loses the capacity to have interstellar travel and are trapped in our own solar system. Few time later, one of the civilizations come knocking on Earth's door asking for help because intergalactic war started. Earth accepts the call, but they send criminals to help with the war."
Anybody know this?