The invention belongs to the fields of innovative medicines and cosmetics and particularly relates to a preparing method and uses of mangostin shown as a formula (I) and mangostin analogues shown as a formula (II). Alpha-mangostin, beta-mangostin, gamma-mangostin and analogues thereof are respectively prepared through olefination and through controlling conditions for deprotection. According to the method, products are high in purity, operation is simple and convenient, yields are high, costs are low and the method is suitable for large-scale production. On one hand, the beta-mangostin, the gamma-mangostin, beta-methoxy-mangostin, and analogues thereof have ultraviolet absorption ability and ultraviolet light radiation preventing functions so that the beta-mangostin, the gamma-mangostin, the beta-methoxy-mangostin, and the analogues thereof can be adopted as a sun-screening agent separately or compounded with other sun-screening agents and applied into cosmetics; and on the other hand, the beta-mangostin, the gamma-mangostin, the beta-methoxy-mangostin, and the analogues thereof have activity of inhibiting acid sphingomyelinase so that the beta-mangostin, the gamma-mangostin, the beta-methoxy-mangostin, and the analogues thereof can be adopted as acid sphingomyelinase inhibitors and applied for preparation of medicines for preventing and treating acid sphingomyelinase related diseases mainly including cardio cerebrovascular diseases, neurological diseases, liver diseases, lung diseases, autoimmune diseases, infectious diseases and the like.