Place the 12 chicken legs into a large zip-top plastic bag or a shallow dish.
In a small bowl or liquid measuring cup, whisk together 1/4 cup olive oil, 1/2 teaspoon sea salt, 1/2 teaspoon ground black pepper, 1/2 teaspoon paprika, 1/2 teaspoon ground cumin, 1/4 teaspoon cayenne pepper, 2 chopped garlic cloves, and 3 tablespoons chopped onion.
Pour the marinade over the chicken, seal the bag (removing excess air) or cover the dish, and move the chicken around to coat evenly.
Refrigerate the chicken to marinate for at least 1 hour or up to overnight.
When ready to bake, preheat the oven to 350°F (175°C) and lightly oil a rimmed baking sheet or oven-safe skillet.
Arrange the marinated chicken legs on the prepared baking sheet or skillet and bake until the internal temperature reaches 160°F (about 30–35 minutes).
Remove the chicken from the oven and brush each piece with 1 cup BBQ sauce, then return to the oven and continue baking until the internal temperature reaches 165°F.
Take the chicken out of the oven and let rest about 3 minutes before serving.