We report the fabrication, electromagnetic simulation and measurement of inverted silicon pyramidal arrays with randomly distributed nanoholes that act as an anti-reflectivity coating. The fabrication route combines the advantages of anisotropic wet etching and metal-assisted chemical etching. The former is employed to form inverted silicon pyramid arrays, while the latter is used to generate randomly distributed nanoholes on the surface and sidewalls of the generated inverted silicon pyramidal arrays. We demonstrate, numerically and experimentally, that such a structure facilitates the multiple reflection and absorption of photons. The resulting nanostructure can achieve the lowest reflectance of 0.45% at 700 nm and the highest reflectance of 5.86% at 2402 nm. The average reflectance in the UV region (250–400 nm), visible region (400–760 nm) and NIR region (760–2600 nm) are 1.11, 0.63 and 3.76%, respectively. The reflectance at broadband wavelength (250–2600 nm) is 14.4 and 3.4 times lower than silicon wafer and silicon pyramids. In particular, such a structure exhibits high hydrophobicity with a contact angle up to 132.4°. Our method is compatible with well-established silicon planar processes and is promising for practical applications of anti-reflectivity coating.