Preheat the oven to 350 degrees F and line a 6x6 inch baking pan with parchment paper.
Melt the butter in a microwave-safe bowl. Stir in the sugar until combined.
Add the egg and vanilla extract to the butter mixture and mix until smooth.
Stir in the cocoa powder, flour, and salt until no dry streaks remain.
Spread half the batter evenly in the prepared pan. Scatter half the candy corn over the batter.
Dollop the remaining batter on top and spread gently to cover the candy corn layer.
Sprinkle the rest of the candy corn over the surface and press lightly so it sticks.
Bake for 20 to 22 minutes until the center is set but still slightly soft. Cool completely in the pan before slicing into four squares.