The invention discloses a magnesium-based bone filling adhesive and its preparation method and application. The adhesive material is composed of a solid phase component and a liquid phase component, wherein the solid phase component is composed of basic oxide, Calcium phosphate, hydrogen phosphate, magnesium phosphate, and starch are mixed evenly; the liquid phase component is prepared by dissolving sugar and hydrogen phosphate in aqueous phosphoric acid. Mix the above-mentioned solid phase components and liquid phase components evenly to form a pasty cement slurry, which is used for filling and repairing bone tissue trauma and treating osteoporosis, especially for the adhesion of bones, tendons, ligaments and prostheses. Bonding and fixing, avoiding the disadvantages of the existing calcium phosphate cement, such as low early strength, non-viscosity, easy collapse, poor biodegradability and magnesium phosphate cement containing ammonium salt, and achieved good results. And it has the characteristics of low raw material cost, simple preparation method, high strength, strong cohesiveness, good collapse resistance, good biodegradability, no ammonia gas, etc., and can be directly injected into the lesion with a syringe or filled into the body after curing and molding. It is very convenient to use, and it can also be used for bonding and fixing building materials such as metal, ceramics, and plastics.