The invention relates to a gel-type polymer electrolyte and a preparation method thereof. The gel-type polymer electrolyte membrane is prepared by using amine terminated nitrile rubber as a matrix of the solid electrolyte, dissolving the matrix, lithium salt, epoxidized polysilsesquioxane, and 1-butyl-3-methylimidazolium trifluoro methane sulfonate in an organic solvent, pouring the solvent on a teflon template, and carrying out heat treatment in a baking oven after volatilizing tetrahydrofuran. Compared with the prior art, the operation is simple; the membrane forming is easy; and the prepared membrane is smooth and uniform, has good mechanical properties, high room-temperature conductivity, and stable electrochemical window, and the prepared membrane used as solid electrolyte materials for the lithium ion battery has an application prospect.