Potassium-ion electrets, which are key elements in vibration-powered microelectromechanical generators, can store negative charge almost permanently. However, our experiments show that the charge storing capability of potassium ion electrets is severely degraded when a SiC plate instead of the usual SiO2 plate is used in the fabrication process, indicating the negative influence of carbon incorporation. We theoretically studied the atomic and electronic structures of amorphous silica (a-SiO2) with and without potassium and carbon atoms using first-principles molecular-dynamics calculations. Our calculations show that negative charge accumulates in fivefold-coordinated Si atoms without carbon contamination. However, carbon contamination of the potassium-ion electret causes oxygen deficiencies in SiO2, hindering the formation of fivefold-coordinated Si atoms. As a result, carbon contamination causes degradation of the negative charge storing capability of potassium ion electrets.