Hierarchical three-dimensional (3D) porous structures of nickel–cobalt layered double hydroxide (LDH) are grown on diatomite biotemplate via one-step hydrothermal method.