Preheat your oven to 350°F (175°C). Grease or line a 12-cup muffin tin with paper liners.
2. Prepare the Muffin Batter:
In a medium bowl, whisk together the flour, baking powder, baking soda, salt, and cinnamon (if using).
In a large bowl, beat together the butter, granulated sugar, and brown sugar until creamy and light, about 2-3 minutes.
Add the eggs, one at a time, beating well after each addition. Stir in the vanilla extract.
Gradually add the dry ingredients to the wet ingredients, alternating with the buttermilk. Start and end with the dry ingredients. Mix until just combined.
Gently fold in the chopped pecans.
3. Make the Pecan Pie Filling:
In a separate bowl, whisk together the corn syrup, brown sugar, melted butter, egg, and vanilla extract until smooth.
Stir in the chopped pecans for the topping.
4. Assemble the Muffins:
Spoon the muffin batter evenly into the prepared muffin tin, filling each cup about 2/3 full.
Carefully spoon about 1 tablespoon of the pecan pie filling on top of each muffin batter, spreading it gently with the back of the spoon.
5. Bake:
Bake in the preheated oven for 18-22 minutes, or until a toothpick inserted into the muffin (avoiding the pecan filling) comes out clean.
The pecan topping should be golden brown.
6. Cool and Serve:
Let the muffins cool in the pan for about 5 minutes before transferring them to a wire rack to cool completely.