The invention discloses sulphur-containing optical epoxy resin and a preparation method thereof. The method comprises the following steps of: taking 2,5-disulfydryl-1,3,4-DMTD and epoxy chloropropane as reaction raw materials; taking one or more of an alkaline solution, quaternary ammonium salt and triphenylphosphine as catalysts; taking aqueous solution or solid of one or more of sodium hydroxide, lithium hydroxide and potassium hydroxide as reaction raw materials in the second step; taking one or more of methylbenzene, dimethylbenzene, benzene, ethylbenzene, diethylbenzene, carbon tetrachloride, methyl isobutyl ketone and methyl ethyl ketone as solvents; and finally, drying in vacuum at room temperature or under the ultra-low temperature condition to obtain dimercaptothiodiazole glycidyl ether epoxy resin. The prepared epoxy resin has the advantages of being high in epoxy value, low in viscosity, higher in refractive index, better in transparent property and the like. The epoxy resin can be applied to the fields, such as optical packaging, optical adhesive, optical part and the like.