In pristine graphitic carbon nitride (g-CN), amino groups often function as structural defects that trap photogenerated charges, resulting in low photocatalytic activity as well as reaction with nitrite, aldehyde, etc., ensuing in poor product yield. Without significantly altering the optical characteristics, the removal of amino groups is necessary to increase the photocatalytic activity and structural stability of pristine g-CN. The deamino graphitic carbon nitride (
DA-gCN-5
) was prepared by
tert
-butyl nitrite (TBN)-treatment, characterized and used as a photocatalyst for the radical C-H arylation of heteroarenes using anilines as radical source. Indeed, the photophysical characteristics of
DA-gCN-5
and those of pristine g-CN are very comparable, except that
DA-gCN-5
has a fewer residual amino groups, higher crystallinity, and compressed structure with a different morphology. Moreover,
DA-gCN-5
-catalyzed C-H arylation reaction offers greater product yield in a shorter reaction time compared to that of pristine g-CN in the coupling between heteroarenes and the in situ generated aryl diazonium salts from anilines under visible light irradiation. The amino groups in pristine g-CN absorbed the TBN that was added to convert aniline into the appropriate diazonium ions during the reaction. As a result, deamino graphitic carbon nitride produced by chemical treatment has better photophysical properties and catalytic activity than pristine g-CN. Additionally, this is the first method that uses diazotization reaction for the preparation of deamino graphitic carbon nitride, as far as we are aware.