Place kidney beans, butter beans, lima beans, and pork and beans in a 2-quart casserole dish.
Heat a saucepan over medium heat; cook and stir bacon, onion, and garlic until bacon is browned, about 10 minutes. Pour off excess fat.
Whisk brown sugar, ketchup, vinegar, molasses, and mustard into bacon mixture; simmer until cooked through, about 20 minutes. Pour sauce over beans in the casserole dish.
Bake in the preheated oven until bubbling, 1 hour 15 minutes.