© 2022 Elsevier B.V.Addressed herein is the enhancement of catalytic activity of Pt-based nanocatalysts in the hydrolysis of ammonia borane (AB) via in-situ synthesis of bimetallic AuPt alloy nanoparticles (NPs) supported on graphitic carbon nitride (gCN). The presented in-situ synthesis protocol yielded gCN/AuxPt100-x (x = 0, 8, 15, 33) nanocatalysts with highly dispersed AuxPt100-x NPs having the average particle sizes varied in the range of 1.6–2.6 nm over the gCN nanosheets. The generated gCN/Pt92Au8 (600.3 mol H2 mol Pt−1 min−1) and gCN/Pt85Au15 (587.1 mol H2 mol Pt−1 min−1) nanocatalysts showed higher catalytic activity compared to gCN/Pt100 (525.7 mol H2 mol Pt−1 min−1) under white-light irradiation, attributed to the synergistic effects aroused in the AuPt alloy NPs and heterojunctions formed between gCN and AuPt alloy NPs. The detailed characterization of photophysical properties of gCN/AuxPt100-x nanocatalysts revealed that their boosted catalytic activity is attributed to the improved charge kinetics, higher light absorption, and effective electron transfer channels from gCN to the bimetallic AuPt alloy NPs. The role of photogenerated carriers in the photocatalytic AB dehydrogenation was also elucidated via scavenger studies. This study shows that gCN/AuxPt100-x nanocatalysts can be prepared in situ during the hydrolysis of AB at room temperature and the yielded nanocatalysts have a significant role in boosting the hydrogen production from the light-assisted hydrolysis of AB.