Lightly grease 4 large sheets of aluminum foil, about 12x18 inches.
Arrange 2 chicken drumsticks and an ear of corn in the center of each sheet of foil. Season with salt and black pepper.
Drizzle corn with melted butter.
Spoon barbeque sauce over chicken.
Divide pinto beans evenly over each portion.
Fold the foil around the chicken and corn and loosely seal the edges. Transfer foil packets to a baking dish.
Bake chicken until no longer pink at the bone and the juices run clear, about 40 minutes. An instant-read thermometer inserted near the bone should read 165 degrees F (74 degrees C).