Preheat oven to 375°F (190° C).
Grease your doughnut pan (if needed).
Prepare your flax egg by whisking together ground flax seeds and water. Set aside to thicken.
In a large bowl, whisk the flour, cocoa, baking powder, baking soda, salt, and coconut sugar.
In a small bowl, mix the milk, melted coconut oil, vanilla, and flax mixture together.
Pour wet ingredients into dry ingredients and mix well to combine.
Using a piping bag or a large Ziploc bag (see note below), pipe the mixture into each cavity of your doughnut pan. Bake for 10 minutes.
Remove from oven and let the pan sit for a few minutes before removing the doughnuts.
Remove the doughnuts from the pan and place on a cooling rack.