Place dates and margarine in a bowl with boiling water and baking soda. Gently mix with a wooden spoon until margarine has melted and dates are plumped up. Let cool to room temperature, at least 30 minutes.
Preheat the oven to 325 degrees F (165 degrees C). Line a 2-pound loaf pan with parchment paper.
Combine flour, brown sugar, and walnuts in a separate bowl. Add to bowl with the date mixture. Mix well with a wooden spoon. Add egg and mix in. Spoon mixture into the prepared pan.
Bake in the preheated oven until a toothpick inserted into the center comes out clean, 60 to 75 minutes. Let cool on a wire rack.