There’s an Alan Dean Foster story (in either the collections “With Friends Like These” or “Who Needs Enemies?”) that’s almost exactly like what you described except a detail or two and the ending is the opposite of what you remember. The time you read it was dead-on accurate.
The Dickson story has the alien kidnap a guy and put him in a zoo. See, there’s these warnings about “Hu-Mans” that every time they get off planet, they take over everything then collapse into infighting. Then the subject races try to exterminate all the remaining humans, but always miss some who begin the cycle all over over again. EVERY ancient text–without exception-that describes this says “If you see them, nuke their planet then blow up their sun–do NOT contact them or let them out”. So of course, the first thing an alien scout ship does when it finds humans is to try to figure out what makes them so dangerous. They grab one human (possibly a hobo?) and lock him in a zoo to study-he has nothing in the cell including his clothes. They can’t figure out why everyone was so scared of these wimpy hairless apes.
Eventually he goes catatonic and curls up in a fetal position holding one of the bars, letting go only to eat and drink. One day, the jailers find him gone. Turns out he’s used his spit (or stomach acid?) to eat away at the bar (this is after literally years). He’s killed his guards (by taking them by surprise) stolen a starship and is making a bee-line back to Earth with all the maps/data they’ve got aboard the starship. The cycle has just started again. I think the title was “Danger! Human”.
The Foster story has roughly the same starting point, but the aliens have sealed all remaining humans in an Earth-sized force-field that’s impenetrable from the inside. A multi-species group of aliens decides to visit Earth to get help against a deadly new invading species. Humans conquered the Galaxy once before, maybe these super-warriors can help. They find humans are quiet, super-mellow farmers in a turn of the (20th) century type world. The humans, being good neighbors and all, offer to help, but to the aliens it’d be like a small group of shepherds from the 14th century offered to help the Allies in WWII.
The aliens shrug, accept and take down the force-field. Suddenly every human in the world joins into a giant hive mind and says “I’M FREE!” and then tells the aliens that A) That forcefield trick was cute, but they won’t let it happen again and B) They promised to help against the bad aliens, and they will…but afterwards, well the Galaxy could use some…organization.
Both are pretty close to what you described.