Beat brown sugar, white sugar, margarine, shortening, eggs, and vanilla extract together in a large bowl with an electric mixer until light and fluffy.
Whisk flour, cocoa powder, baking soda, and salt together in a separate bowl; beat into sugar mixture until you have a dough. Stir chocolate chips and walnuts into dough. Drop rounded teaspoonfuls of dough 2 inches apart onto baking sheets.
Bake in the preheated oven until golden and set, 8 to 10 minutes. Cool briefly on the baking sheets before transferring to wire racks to cool completely.