The invention relates to a modified inorganic nanoparticle toughening epoxy resin pouring sealant and a preparation method thereof. The epoxy resin pouring sealant consists of epoxy resin, a curing agent, an accelerant of the curing agent, an active diluent and polyaniline modified inorganic nanoparticles. The polyaniline has amino groups on the molecule chain, the boundary binding property of the inorganic nanoparticles and the epoxy resin can be improved, the dispersion of the inorganic nanoparticles in the epoxy resin is promoted, and meanwhile as the polyaniline has certain flame retardancy and a good heat conduction coefficient, the polyaniline modified inorganic nanoparticles can be toughened and at the same time the flame retardancy and the heat conduction property are improved, and multiple properties of a material are synchronously improved. The preparation method is simple in process and convenient to operate, an obtained pouring sealing material is low in toxicity and good in flowability, and the condensate of the pouring sealing material is very high in impact resistance, good in flame retardancy, low in linear expansion coefficient, high in heat conductivity and very suitable for sealing electronic devices in a pouring manner.