Waste gourd shells enriched with ash-forming elements are selected as raw materials in this paper, discovering that the K and Ca compounds in the precursor not only exhibit the ability of self-forming pores, but also demonstrate catalytic graphitization of the hard carbon during the pyrolysis procedure.