A 25.7 T/32 mm all-superconducting nuclear magnetic resonance magnet, consisting of a 10.7 T/32 mm rare earth-barium-copper-oxide (REBCO) high temperature superconducting (HTS) insert and a 15 T/160 mm low temperature superconducting magnet, has been manufactured at the Institute of Electrical Engineering, Chinese Academy of Sciences. There is a large electromagnetic force induced in the HTS insert after the superconducting magnet is energized, which may cause the mechanical failure of the REBCO tape. To protect the HTS insert during its energization, it is necessary to apply suitable winding tension on the REBCO tape and overband. In this paper, the effect of winding conditions on the stress distribution in the HTS coil was investigated, in which the winding tension applied on the REBCO tape and overband on the HTS insert were included. A checking test was conducted after the superconducting magnet quenched at 25.7 T, which shows that the HTS coil did not burn out and suffer catastrophic damage. The optimized pretension load and overband conditions utilized to wind the HTS coil could protect it from the excessive electromagnetic force when the central field exceeded 25 T.