Context. The initial stage of star formation is a complex area of study because of the high densities (nH2 > 106 cm−3) and low temperatures (Tdust < 18 K) involved. Under such conditions, many molecules become depleted from the gas phase by freezing out onto dust grains. However, the deuterated species could remain gaseous under these extreme conditions, which would indicate that they may serve as ideal tracers. Aims. We investigate the gas dynamics and NH2D chemistry in eight massive precluster and protocluster clumps (G18.17, G18.21, G23.97N, G23.98, G23.44, G23.97S, G25.38, and G25.71). Methods. We present NH2D 111–101 (at 85.926 GHz), NH3 (1, 1), and (2, 2) observations in the eight clumps using the PdBI and the VLA, respectively. We used 3D GAUSSCLUMPS to extract NH2D cores and provide a statistical view of their deuterium chemistry. We used NH3 (1, 1) and (2, 2) data to investigate the temperature and dynamics of dense and cold objects. Results. We find that the distribution between deuterium fractionation and kinetic temperature shows a number density peak at around Tkin = 16.1 K and the NH2D cores are mainly located at a temperature range of 13.0 to 22.0 K. The 3.5 mm continuum cores have a kinetic temperature with a median width of 22.1 ± 4.3 K, which is obviously higher than the temperature in NH2D cores. We detected seven instances of extremely high deuterium fractionation of 1.0 ≤ Dfrac ≤ 1.41. We find that the NH2D emission does not appear to coincide exactly with either dust continuum or NH3 peak positions, but it often surrounds the star-formation active regions. This suggests that the NH2D has been destroyed by the central young stellar object (YSO) due to heating. The detected NH2D lines are very narrow with a median width of 0.98 ± 0.02 km s−1, which is dominated by non-thermal broadening. The extracted NH2D cores are gravitationally bound (αvir < 1), they are likely to be prestellar or starless, and can potentially form intermediate-mass or high-mass stars in future. Using NH3 (1, 1) as a dynamical tracer, we find evidence of very complicated dynamical movement in all the eight clumps, which can be explained by a combined process with outflow, rotation, convergent flow, collision, large velocity gradient, and rotating toroids. Conclusions. High deuterium fractionation strongly depends on the temperature condition. Tracing NH2D is a poor evolutionary indicator of high-mass star formation in evolved stages, but it is a useful tracer in starless and prestellar cores.