The invention relates to oxyheterospiro derivatives, a preparation method thereof and an application in medicine. In particular, the present invention relates to the oxo heterospiro derivatives shown in general formula (I), its preparation method and pharmaceutical composition containing the derivatives, its use as mor receptor agonist, and its use in the preparation of drugs for the treatment and / or prevention of pain and pain related diseases. The substituents of general formula (I) are the same as those in the specification.本發明涉及氧雜螺環類衍生物、其製備方法及其在醫藥上的應用。特別地,本發明涉及通式(I)所示的氧雜螺環類衍生物、其製備方法及含有該衍生物的藥物組合物,以及其作爲MOR受體激動劑的用途,和其在製備治療和/或預防疼痛和疼痛相關疾病的藥物中的用途。其中通式(I)的各取代基同說明書中的定義相同。