Preheat the oven to 350 degrees F. Lightly grease an 8 by 8 inch baking dish and set it aside.
Place the ground beef and chopped onion in a large skillet over medium heat. Cook, breaking up the beef, until it is browned and the onion is soft. Drain any excess fat.
Add the pork and beans, brown sugar, barbecue sauce, mustard, salt, and pepper to the skillet. Stir until everything is evenly combined.
Pour the mixture into the prepared baking dish and spread it into an even layer.
Bake uncovered for 35 minutes, or until the edges are bubbly and the top looks slightly thickened.