Heat a Dutch oven or large pan over medium heat and cook the bacon pieces, stirring often, until browned and cooked but not super crispy, about 30 minutes.
Remove the bacon to a paper towel lined plate and drain all but 2 Tablespoons of bacon fat.
Reduce heat to medium-low and add the onions.
Cook, stirring occasionally and scraping up the browned bits on the bottom of the pan, until the onions are dark brown and caramelized, about 45 minutes.
Stir in the coffee, maple syrup, vinegar, brown sugar, garlic, black pepper, cayenne pepper, and cooked bacon pieces.
Bring to a simmer and cook, stirring often, until thickened to a jam-like consistency, about 45-60 minutes.
OPTIONAL - If you want your jam to be a bit smoother and more spreadable, remove it from heat and allow it to cool for 5-10 minutes.
Place in a food processor or high-speed blender and pulse a few times until you get your desired consistency.