Melt butter in a medium saucepan over medium heat. Add onion and cook until softened, about 5 minutes. Add garlic and cook until fragrant, about 30 seconds.
Add ketchup, molasses, brown sugar, vinegar, mustard, chili powder, black pepper, and cayenne pepper and stir to combine. Bring to a boil, then reduce heat to low and simmer until slightly thickened, about 30 minutes, stirring frequently.
Transfer sauce to the jar of a blender and blend until smooth. Let cool to room temperature, transfer to a jar and store in refrigerator for up to a month.
Notes
The key to a great Kansas City BBQ sauce is balancing the sweetness of the brown sugar and molasses with the tanginess of the apple cider vinegar. Taste as you go and adjust the levels to match your preference. If it’s too sweet, add a bit more vinegar; if it’s too tangy, a bit more brown sugar will do the trick.
Not everyone likes their BBQ sauce spicy, so adjust the cayenne pepper to your liking. Start with a small amount and add more if you want extra kick. You can also experiment with different types of chili powders to find your perfect level of heat.
Patience is key when making BBQ sauce. Allowing the sauce to simmer on low heat for at least 20-30 minutes helps meld the flavors together, resulting in a richer, more complex taste. Stir occasionally to prevent sticking and make sure to let the sauce cool before storing it.