A novel ternary nanocomposite, mesoporous graphitic carbon nitride/black phosphorus-AgPd (denoted mpg-CN/BP-AgPd), was successfully fabricated by assembling the as -prepared AgPd alloy nanoparticles (NPs) on mesoporous graphitic carbon nitride/black phosphorus (mpg-CN/BP) binary composites. This novel nanocomposite comprises a heterojunction support material formed by two distinct nonmetallic semiconductors (mpg-CN and BP) with adaptable band gaps and edge voltages, providing enhanced catalytic activity to AgPd alloy NPs in hydrogen generation from the methanolysis of ammonia borane (AB) compared to its single components under the blue light-emitting diode (LED) light illumination. The yielded mpg-CN/BP-AgPd ternary nanocomposites were characterized by many advanced analytical techniques (transmission electron microscopy (TEM), high-resolution TEM (HR-TEM), X-ray diffraction (XRD), X-ray photoelectron spectroscopy (XPS), photoluminescence spectroscopy (PL), time-resolved spectroscopy, inductively coupled plasma-mass spectroscopy (ICP-MS), and fourier transform infrared (FTIR), and then they were tested as catalysts in hydrogen generation from the methanolysis of AB at room temperature. Several parameters such as the effect of mpg-CN/BP ratio, alloy composition, and type of the light source were studied to optimize the catalytic activity of the mpg-CN/BP-AgPd nanocomposites in the methanolysis of AB. The best catalytic activity of mpg-CN/BP-AgPd nanocomposites was obtained using an mpg-CN/BP ratio of 5/1 (wt/wt) and Ag50Pd50 alloy composition under the blue LED illumination at room temperature. The activity of the ternary nanocomposites was further enhanced by the acetic acid treatment, and a high initial turnover frequency of 43.7 mol(center dot H-2) mol(catalyst)(-1) min(-1) was reported. Besides their high catalytic activity, the mpg-CN/BP-AgPd nanocomposites were reusable catalysts in the methanolysis of AB. This study also included detailed kinetics of AB methanolysis catalyzed by mpg-CN/BP-AgPd nanocomposites.