Preheat oven to 350°F.
In a large Dutch oven, cook diced bacon over medium heat until crispy. Remove bacon and set aside, leaving the fat in the pot.
Season chicken thighs with salt and pepper. In the same pot, brown chicken on both sides. Remove and set aside.
Add chopped onions and carrots to the pot, sauté until onions are translucent. Add garlic and cook for another minute.
Pour in red wine, scraping the bottom of the pot to loosen any browned bits. Add chicken stock, bay leaf, and thyme. Bring to a simmer.
Return chicken and bacon to the pot. Cover and transfer to the oven. Bake for about 1 hour, or until chicken is tender.
In a separate pan, melt butter over medium heat. Add flour and cook for 1-2 minutes to form a roux. Add mushrooms and pearl onions, cook until browned and tender.
Remove chicken from the oven. Place pot over medium heat. Stir in mushroom and onion mixture. Cook until sauce thickens slightly.
Adjust seasoning with salt and pepper. Serve hot.