The Tibet-III air shower array, consisting of 533 scintillation detectors, has been operating successfully at Yangbajing in Tibet, China since 1999. Using the dataset collected by this array from 1999 November through 2005 November, we obtained the energy spectrum of $gamma$-rays from the Crab Nebula, expressed by a power law as $(dJ/dE) = (2.09pm0.32)times10^{-12} (E/{rm 3 TeV})^{-2.96pm0.14} {rm cm}^{-2} {rm s}^{-1} {rm TeV}^{-1}$ in the energy range of 1.7 to 40 TeV. This result is consistent with other independent $gamma$-ray observations by imaging air Cherenkov telescopes. In this paper, we carefully checked and tuned the performance of the Tibet-III array using data on the moons shadow in comparison with a detailed Monte Carlo simulation. The shadow is shifted to the west of the moons apparent position as an effect of the geomagnetic field, although the extent of this displacement depends on the primary energy positively charged cosmic rays. This finding enables us to estimate the systematic error in determining the primary energy from its shower size. This error is estimated to be less than $pm$12% in our experiment. This energy scale estimation is the first attempt among cosmic-ray experiments at ground level. The systematic pointing error is also estimated to be smaller than $0fdg011$. The deficit rate and position of the moons shadow are shown to be very stable within a statistical error of $pm$6% year by year. This guarantees the long-term stability of point-like source observation with the Tibet-III array. These systematic errors are adequately taken into account in our study of the Crab Nebula.