The development of high-performance, low-cost, and high-stability catalysts for electrocatalytic hydrogen evolution reaction is a key step in the green and sustainable production of hydrogen energy. Herein, we prepared 2D Ni@C nanosheets by high-temperature carbonization of 2D MOFs DUT-8(Ni). It was used as a highly efficient hydrogen evolution catalyst in alkaline solution. We compared the properties of the composites obtained at different carbonization temperatures. It was found that the DUT-8(Ni) was not completely decomposed at low temperatures, and the Ni NPs had lower crystallinity, so the composites show poor electrocatalytic performance. With the increase of carbonization temperature, DUT-8(Ni) was completely decomposed, and the crystallinity of Ni NPs gradually increased, and the electrocatalytic performance gradually improves. However, when the temperature was 800 °C, the electrochemical surface area of the composite reduced, the electrocatalytic performance decreased slightly. The Ni NPs were uniformly embedded on the 2D carbon nanosheets. The carbon nanosheets matrix provides good electrical conductivity. At the same time, the Ni NPs coated the thin graphite carbon layer can effectively prevent particle agglomeration. This method provides an idea for the preparation of 2D high-performance electrocatalysts.