Heat oven to 350 degrees. Line 2 baking sheets with parchment paper.
Melt butter in a small pot over medium heat and add ginger, if using. Remove from heat and let sit a few minutes while you prepare everything else.
In a large bowl, whisk flour, cocoa powder, baking soda, cinnamon, ground ginger and salt.
In a medium bowl, whisk together sugar, molasses, egg and ginger butter. Using a spatula, slowly mix into dry ingredients, mixing until no dry spots remain.
Using your hands, roll small balls of dough about the size of a quarter (dough will be soft — if it is too soft for you to handle, pop into the fridge for a few minutes to firm up). Roll the balls in the sanding sugar and place on the prepared baking sheets about 1-inch apart.
Bake until just puffed and baked through, 6 to 8 minutes. Let cool completely before eating.