Heat a large, Dutch oven over medium heat. When hot, add the oil, then the fennel seeds, and stir for about 1 minute, until toasted and fragrant.
Add the onion slices, fennel slices, 1 teaspoon salt, and a pinch of freshly ground pepper. Stir to mix the fennel seeds and lift them off the bottom of the pot. Cover and cook for 30 minutes. Stir to the bottom every 5 to 10 minutes, then remove lid, reduce heat to low, and continue to cook, stirring occasionally, for another 1 1/2 to 2 hours.
The jam is finished when the onions and fennel turn a rich brown color and almost all the liquid has evaporated from the pan. Season to taste with salt and pepper. Serve warm, or keep in the refrigerator, in a covered container for up to 2 weeks.