Graphdiyne (GDY), a new kind of two-dimensional (2D) carbon allotropes, has extraordinary electrical, mechanical, and optical properties, leading to advanced applications in the fields of energy storage, photocatalysis, electrochemical catalysis, and sensors. However, almost all reported methods require metallic copper as a substrate, which severely limits their large-scale application because of the high cost and low specific surface area (SSA) of copper substrate. Here, freestanding three-dimensional GDY (3DGDY) is successfully prepared using naturally abundant and inexpensive diatomite as template. In addition to the intrinsic properties of GDY, the fabricated 3DGDY exhibits a porous structure and high SSA that enable it to be directly used as a lithium-ion battery anode material and a 3D scaffold to create Rh@3DGDY composites, which would hold great potential applications in energy storage and catalysts, respectively.