Preheat your oven to 350°F and lightly grease a 8x8 -inch baking dish with non-stick spray.
In a preheated skillet, lightly crisp up bacon (do not cook all the way through). Then add some butter (if there isn't enough fat from the bacon) over medium to medium-high heat and cook the onions, stirring occasionally, until they're soft and translucent.
In your dish, combine the baked beans, ketchup, mustard, molasses, and brown sugar, and stir until well blended.
Add the sautéed onions to the mixture and mix everything together.
Arrange the bacon strips on top in a single layer. Place the dish in the oven, uncovered, and bake for 1.5 hours. Keep an eye on the beans — they’re done when the top turns golden brown and slightly caramelized.
If you're doubling the recipe, simply extend the baking time to 2 hours for the perfect result.