The electrocatalytic conversion of methane has attracted considerable attention owing to its ability to operate under mild conditions, thereby avoiding peroxidation. Recently, hydroxyapatite (HAP), an environmental-friendly and cost-effective electrocatalyst, was found to have high catalytic selectivity for the methane activation to produce alcohols. However, the overall activation mechanism still remains elusive and thus limits further improvement of the catalytic performance. In this study, we employed machine learning-assisted molecular dynamics simulations to analyze the structural modifications in the HAP with defects during sintering. Density functional theory calculations were performed to explore the catalytic mechanism of methane on various sintered surfaces of HAP. During the sintering of HAP, the presence of H2O or O vacancies causes the migration of H2O and OH species from the bulk phase toward the surface. On the basis of our simulations, the H2O or OH migration reduces the overpotential of oxygen evolution reactions and alters the stability of intermediates. It largely impacts the selectivity of methane activation and different products can be obtained depending on the defect modes. Our mechanistic proposal then fundamentally challenges the prevailing opinion that active sites are exclusively confined to the surface of HAP. Our work may pave the way for designing and synthesizing novel electrocatalysts with enhanced performance and efficiency.