Preheat oven to 350 degrees and grease a 2-quart casserole or baking dish.
First prepare the base. In a medium bowl combine sugar, flour, cocoa powder, baking powder, and salt – whisk well. In another bowl (or liquid measuring cup) whisk milk and melted butter. Add wet ingredients and mix until combined. (A few small lumps are okay) Spread mixture in the bottom of prepared dish.
Next prepare the top layer. In a small bowl whisk together sugar, brown sugar, cocoa powder, and salt. Sprinkle mixture on top of your base in the baking dish. Stir vanilla into hot water. Slowly pour water over the sugar mixture.
Bake for 30-45 minutes until the middle is mostly set. (Just give it a little shake – if it still moves a lot in the middle, it’s not quite ready) Serve warm with ice cream.