Add dry beans to a large container and fill with cold water. Soak overnight. The following day, add beans and their soaking water to a large pot and bring up to a simmer. Cook until tender, between 1 and 2 hours. Drain the beans while reserving the liquid.
Preheat your oven to 325 degrees F.
Pour your beans into a large casserole dish and spread evenly, layer bacon and onion on top.
In a small saucepan add the molasses, salt, pepper, dry mustard, ketchup, Worcestershire sauce, and brown sugar. Slowly bring the sauce up to a boil, simmer for a minute or two. Pull sauce off the heat and pour over the beans. Pour in reserved cooking water from the beans until beans are just covered. Tightly cover the casserole dish with aluminum foil.
Bake in preheated oven for 3 to 4 hours. Remove the aluminum foil halfway through cooking time and add in a small amount of extra liquid if the beans start to get dry. Remove from the oven once beans are tender, cool, and serve.