Wash and dry zucchini. Grate finely using a box grater. Squeeze out excess moisture using a kitchen towel or paper towels.
In a medium bowl, whisk together all-purpose flour, cocoa powder, baking soda, baking powder, and salt.
In a large bowl, whisk granulated sugar, brown sugar, vegetable oil, eggs, and vanilla extract until smooth and glossy.
Fold grated zucchini into wet ingredients. Then gradually add dry ingredients, folding just until combined without overmixing.
Gently fold in chocolate chips and chopped nuts if using.
Line a 12-cup muffin tin with paper liners or grease lightly. Divide batter evenly among cups, filling each about 3/4 full.
Bake at 350°F (175°C) for 18-22 minutes, until a toothpick inserted comes out with a few moist crumbs. Avoid overbaking.
Cool muffins in the pan for 5 minutes, then transfer to a cooling rack. Serve warm or at room temperature.