Cook Bacon:
In a large skillet over medium heat, cook bacon until crispy. Remove with a slotted spoon and drain on paper towels. Reserve 2–3 tablespoons of bacon fat in the skillet.
Cook Onions and Garlic:
Add chopped onions to the skillet and cook in reserved bacon fat over medium heat until caramelized, about 10–12 minutes. Stir in garlic and cook for another 1–2 minutes.
Combine Ingredients:
Add cooked bacon back to the skillet along with brown sugar, maple syrup, apple cider vinegar, brewed coffee (if using), black pepper, and red pepper flakes. Stir well to combine.
Simmer:
Reduce heat to low and simmer, stirring occasionally, for 20–25 minutes until thick and jam-like.
Blend (Optional):
For a smoother consistency, pulse mixture a few times in a food processor or use an immersion blender until desired texture is reached.
Cool and Store:
Allow bacon jam to cool slightly before transferring to a jar or container. Refrigerate until ready to use.