2 teaspoons ground cayenne pepper, to taste (Optional)
Preheat the oven to 350 degrees F (175 degrees C).
In a large pan over medium heat, fry the ground beef, onion, and mesquite seasoning until the beef is no longer pink, about 10 minutes. Remove any excess grease from the meat mixture and place it in a large baking dish. Add the baked beans, molasses, brown sugar, barbeque sauce, dry mustard powder, and cayenne pepper. Mix together well and bake in the preheated oven, uncovered, until bubbly, about 45 minutes.
Bake for 20 minutes in a preheated 350°F oven, or until the beans are bubbling and the flavors have melded.