This claim was made by German politician Boris Palmer:
Was Afghanistan angeht, gibt es eine gefühlte Wahrnehmung von Unsicherheit, die vor allem durch Bilder von Anschlägen transportiert wird.“ Diese habe jedoch nichts mit der statistischen Wahrscheinlichkeit zu tun, „dass jemandem tatsächlich etwas zustößt, der dorthin abgeschoben wird“. Er zog einen Vergleich zu Brasilien: Dort würden jedes Jahr 50.000 Menschen umgebracht, das Land sei so gefährlich wie Afghanistan
My translation:
Regarding Afghanistan, there is a perception of danger, based primarily on images of [terrorist] attacks. However this had nothing to do with the statistical probability of someone getting hurt, who's deported there. He [Palmer] compared Brazil: 50,000 people were killed there every year, the country is as dangerous as Afghanistan.
I've tried to verify this, but only found a table of "intentional homicide rates" (https://en.wikipedia.org/wiki/List_of_countries_by_intentional_homicide_rate), but this explicitly "excludes killings directly related to war or conflicts". I've found estimates of how many people died during the invasion, but nothing about the last 5 years or so.
EDIT: The context is this: Boris Palmer is a member of the (mostly pro-refugee) Green Party and he's using this comparison to argue that people fleeing from Afghanistan shouldn't be granted refugee status, because Afghanistan isn't more dangerous than other countries, like Brazil.
I agree with the comments that the quote is vague. It's not clear what number he's comparing the homicide rate in Brazil to. It's possible that he's just comparing the intentional homicide rates from both countries, but since people are fleeing from war or conflict, not intentional homicide, it seems misleading to compare numbers that exclude victims of war or conflict. The only comparison that would make sense to me is comparing the "danger of getting killed" in both countries, including thus including victims of conflict, terrorist attacks etc.