Rinse the navy beans in a colander and remove any stones or debris.
Add the beans and 6 cups of water to the Instant Pot.
Close the Instant Pot lid and set the pressure release valve to "sealing."
Cook on high pressure for 25 minutes.
When the cooking time is up, allow the pressure to release naturally for 10 minutes, then carefully release any remaining pressure.
Drain the beans and set aside.
On the saute setting, cook the bacon for 3 minutes or until it begins to crisp. Add the onion and garlic and cook for 1 additional minute.
Return the beans to the instant pot, and add the chopped onion, chopped bacon, ketchup, molasses, brown sugar, mustard, salt, and black pepper to the Instant Pot.
Stir everything together until the ingredients are well combined.
Close the Instant Pot lid and set the pressure release valve to "sealing."
Cook on high pressure for 15 minutes.
When the cooking time is up, allow the pressure to release naturally for 10 minutes, then carefully release any remaining pressure.
Stir the baked beans and serve hot.
Notes
Burn Notice: If you get a burn notice, you can open the pot and check. Increase the sauce or even try adding a bit of water. Some Instant Pots seem to be more sensitive than others.
Sauce is too thin: To thicken the sauce, turn the pot to saute and cook until desired thickness is reached.
Sauce is too thick: To thin, add a bit of water and stir thoroughly.
Double the recipe: You can double this recipe, but make sure not to fill the Instant Pot more than 2/3 full.