Preheat your oven to 350°F (175°C). Line a 9x13-inch baking pan with parchment paper, leaving some overhang for easy removal later.
In a medium saucepan over low heat, combine the unsalted butter and coarsely chopped baking chocolate. Stir occasionally until melted and smooth. Remove from heat and let cool slightly.
In a large mixing bowl, combine the melted chocolate mixture with granulated sugar. Stir well to incorporate. Add the eggs, one at a time, mixing well after each addition. Then, stir in the vanilla extract.
In a separate bowl, whisk together the cocoa powder, salt, and all-purpose flour until well combined.
Gradually add the dry ingredients to the wet mixture, folding gently with a rubber spatula until just combined. Be careful not to overmix!
Gently fold in the M&Ms, reserving a handful for topping.
Pour the brownie batter into the prepared baking pan, smoothing the top with the spatula. Sprinkle the reserved M&Ms evenly over the top. Bake in the preheated oven for 25-30 minutes, or until a toothpick inserted into the center comes out with a few moist crumbs.
Allow the brownies to cool in the pan for about 15 minutes before lifting them out using the parchment overhang. Transfer to a wire rack to cool completely before cutting into squares.