We have created a facial self-templated method to synthesize three distinct nanostructures, including the unique edge-cut Cu@Ni nanocubes, edge-notched Cu@Ni nanocubes, and mesoporous Cu–Ni nanocages by selective wet chemical etching method. Moreover, in the synthesis process, the corners of edge-cut Cu@Ni nanocubes and mesoporous Cu–Ni nanocages can be etched to produce the highly catalytically active (111) facets. Impressively, compared to edge-notched Cu@Ni nanocubes and edge-cut Cu@Ni nanocubes, the Cu–Ni nanocages exhibit higher electrocatalytic activity in the hydrogen evolution reaction (HER) under alkaline conditions. When obtained overpotential is 140 mV, the current density can reach 10 mA cm–2; meanwhile, the corresponding Tafel slope is 79 mV dec–1. Moreover, from the calculation results of density functional theory (DFT), it can be found that the reason why the activity of pure Ni is lower than that of Cu–Ni alloy is that the adsorption energy of the intermediate state (adsorbed H*) is too strong. Meanwhile the Gibbs free-energy (|ΔGH*|) of (111) facets is smaller than that of (100) facets, which brings more active sites or adsorbs more hydrogen.