We report the facile and environmental-friendly synthesis of an efficient carbon nitride photocatalyst for hydrogen production and dyes degradation by using a unique supramolecular assembly with an element gradient as the reactant. The element gradient is acquired through the selective removal of barbituric acid from the surface of a supramolecular assembly that comprises barbituric acid, melamine, and cyanucric acid, using hydrochloric acid as a surface modifier. The tailored design of the supramolecular aggregate results in inner and outer parts, which have carbonrich and carbon-poor domains, respectively. Structural and optical investigations of the new assemblies reveal that the hydrogen−chlorine interaction generates a carbon gradient through the starting supramolecular assembly and to a better packing and structural alignment of the supramolecular units. Detailed X-ray photoelectron spectroscopy and photophysical studies of the final carbon nitride-like materials after calcination at 550 °C indicate that the element gradient across the starting precursor directly projects on the final carbon nitride chemical and element composition, as well as on its optical and photocatalytic properties. The spatial arrangement of the starting monomers leads to the formation of a unique energy-level structure in the final material, which is intended to improve the efficiency of charge separation under illumination and, thereby, result in a strong enhancement of photocatalytic activity toward a high hydrogen production and fast dyes degradation. This work provides new opportunities for the rational design of carbon nitride and other metal-free materials with unique and controllable chemical, optical, and catalytic properties for sustainable energyrelated applications.