Developing high activity and eco-friendly photocatalysts for water splitting is still a challenge in solar energy conversion. In this paper, B doped g-C3N4 quantum dots (BCNQDs) were prepared via a facile molten salt method using melamine and boron oxide as precursors. By introducing BCNQDs onto the surface of g-C3N4, g-C3N4/BCNQDs heterojunction was constructed via hydrothermal treatment. The resulting g-C3N4/BCNQDs heterojunction exhibits enhanced hydrogen evolution performance for water splitting under visible light irradiation. The mechanism underlying the improved photocatalytic activity was explored and discussed based on the formation of heterojunction between g-C3N4 and BCNQDs with well-matched band structure.