Preheat the oven to 375 degrees Fahrenheit. Line a 9x13 baking pan with foil or parchment paper and spray with nonstick spray, set it aside.
Add the brown sugar, granulated sugar, butter, and peanut butter to a large bowl and cream them together for a couple of minutes until light and fluffy.
Add in the eggs and vanilla, and stir until combined.
Add in the flour, baking soda and salt. Stir them together until combined to have a soft cookie dough.
Carefully fold in 1 cup of the candy corn with a rubber spatula or wooden spoon.
Press the cookie batter into the prepared pan all the way into the corners, pressing it down evenly.
Press the remaining 1/2 cup of candy corn into the top of the batter.
Bake the bars for 20 to 25 minutes, or until a toothpick can be inserted and comes out clean.
Remove the pan from the oven and let it cool. Carefully lift the foil out of the pan then cut into pieces.