The invention discloses a preparation method for a triazine hyperbranched macromolecular carbon forming agent. The method is characterized by comprising the following steps: 1), mixing diamino or hydroxyl compound with non-protonic organic solvent, and adding catalyst in the atmosphere of inert gases; 2), dropwise adding cyanuric chloride non-protonic organic solution, and continuing the reaction at the temperature after finishing dropwise adding the cyanuric chloride non-protonic organic solution; 3), adding blocking agent, and carrying out reaction again; and 4), precipitating, filtering, cleaning the organic solvent, separating, and drying to obtain the triazine hyperbranched macromolecular carbon forming agent. Compared with the prior art, the invention has the advantages that the 'one-pot' method is adopted, the reaction process is continuous, the reaction time is short, the product has favorable heat stability, the carbon forming rate is high, and the processability is good.