The invention relates to the technical field of cable materials, in particular to a flame-retardant TPE cable insulation material or sheathing material with an electromagnetic shielding function and apreparing method thereof. The TPE cable insulation material or sheathing material is prepared from, by weight, 20-40 parts of SEBS or SEPS, 10-30 parts of PP, 10-30 parts of POE, 5-20 parts of PE, 20-40 parts of oil, 5-45 parts of graphene, 5-35 parts of flame retardant, 0.5-5 parts of compatilizer, and 0.02-0.1 part of antioxygen. The flame-retardant PVC cable insulation material or sheathing material has the electromagnetic shielding function, the shielding effectiveness (SE) value of the flame-retardant PVC cable insulation material or sheathing material can reach 17-50 db, the flame-retardant effect is excellent, the vertical burning test of a single cable can reach V0 level, the strength is high, the tensile strength can reach 17 MPa or above, the flexibility is good, the elongationat break is high and can reach 470% or above, and the mechanical performance is excellent.