The invention belongs to the technical field of polymer electrolytes, and particularly relates to a boron-containing gel polymer electrolyte and a preparation method and application thereof. The gel polymer electrolyte is prepared from lithium salt, an organic solvent, a photoinitiator, boron-containing heterocyclic photosensitive monomers and acrylate monomers in a copolymerization mode. The preparation method of the gel polymer electrolyte includes the steps that a compound containing boric acid groups and an alkene compound with a diol structure are esterified to obtain boron-containing heterocyclic alkene monomers, and the boron-containing heterocyclic alkene monomers, the acrylate monomers, the photoinitiator, the lithium salt and the organic solvent are uniformly dispersed; a mould containing the mixed solution is irradiated by an LED lamp for surface photo-initiated polymerization, and the boron-containing gel polymer electrolyte is obtained. The boron-containing gel polymer electrolyte has high ionic conductivity and a high cationic transference number, effectively solves the problems of liquid leakage, corrosion, poor mechanical performance and the like of a liquid electrolyte in traditional lithium-ion batteries and can be applied to preparation of supercapacitors, lithium-ion batteries, hybrid supercapacitors and the like.