Preheat the oven to 350°F (180°C). Line a rimmed half-sheet baking pan with a wire rack and set aside.
Remove the chicken legs from packaging and pat them dry with paper towels; set aside.
In a small microwave-safe bowl, melt the butter until fully liquid and set aside to cool slightly.
In a medium bowl, combine the flour, chili powder, paprika, garlic powder, onion powder, cayenne, cumin, kosher salt, black pepper, and brown sugar; mix well.
Brush a generous coat of melted butter over each chicken leg.
Press each buttered chicken leg into the seasoned flour mixture, coating all sides and gently pressing the coating onto the skin.
Place the coated legs on the prepared rack with space between them for air circulation.
Bake on the middle oven rack for 35 minutes, until the chicken is cooked through and skin is crisp.
Remove from the oven and let rest for at least 10 minutes before serving.