The invention provides a carbon material loaded silver-platinum nano-alloy composite material and a preparation method thereof, and the composite material is composed of a carbon carrier and silver-platinum nano-particles, wherein the carbon carrier is selected from one of conductive carbon black, a heteroatom doped carbon material, a carbon nano-tube and graphene; and the atomic ratio of silver to platinum in silver-platinum nanoparticles is 1: 20-1: 3. The preparation method of the composite material comprises the following steps: (1) preparing a precursor solution consisting of silver saltand platinum salt; (2) mixing the precursor solution, a carbon material and a solvent, and performing heating. The preparation method disclosed by the invention is suitable for various carbon materials, strong in applicability, simple and convenient in process, high in repeatability, high in yield, mild in used reaction conditions, environment-friendly and convenient for large-scale industrial production. The prepared composite material has the advantages of high catalytic activity, good stability, low cost and the like, and has potential application values in the fields of chemical catalysis,electrochemical catalysis, photocatalysis and electrochemical sensors.