The invention relates to a multi-hydrogen isoquinoline derivative as well as a preparation method and medical application thereof, the multi-hydrogen isoquinoline derivative is a compound as shown ina formula (I) or cis/trans isomers, enantiomers, diastereoisomers, racemates, solvates, hydrates or pharmaceutically acceptable salts thereof, and Z, R1, R2, G, n, W and Y are defined in the specification. The novel molecular polyhydroisoquinoline derivative is novel in structure, higher in safety, small in side effect and better in patent medicine property, has the analgesic activity equal to oreven higher than that of morphine, is simple in synthesis operation, provides a feasible method for realizing large-scale preparation in a laboratory, can be used for preparing medicines for preventing, treating and improving pain, and has wide application prospects. The pain such as acute pain, chronic pain such as inflammatory pain and peripheral mediated neuropathic pain, preferably migraine, is treated, the effect is remarkable, and the derivative is worthy of popularization.