Graphitic carbon nitride is a new type of carbon-based nanomaterial with superior properties and great potential for application, which raised great concerns about their environmental and occupational exposure. Graphitic carbon nitride has been reported to accumulate in the lung potentially, however, the respiratory hazard effect of graphitic carbon nitride is still unknown. In the present study, we reported that graphitic carbon nitride (g-CN) and its doped variant sulfur doped graphitic carbon nitride (S-g-CN) nanosheets inhalation induced pulmonary inflammation, increased the production of pulmonary surfactant in alveolar type II epithelial cells, accompanied by the upregulation of lipids transporter expression levels in alveolar macrophages to clear excessive pulmonary surfactant in the alveolar. Further investigation found that the internalization of g-CN and S-g-CN prevented lipid phagocytosis and metabolic processes in alveolar macrophages, ultimately leading to the deposition of proteins and phospholipids in the lung. Furthermore, we found that g-CN was more robust in inhalation toxicity compared to sulfur doped form, which meant the doping of sulfur in graphitic carbon nitride reduced hazardous effects on the respiratory system. In summary, our study demonstrated that inhalation of graphitic carbon nitride nanosheets caused the deposition of pulmonary surfactants in lung, providing an insightful reference for pulmonary toxicity assessment of graphitic carbon nitride.