We propose a mathematically rigorous method to measure the spontaneous curvature of a bilayer membrane by molecular dynamics (MD) simulation, which provides description of the molecular mechanisms that cause the spontaneous curvature. As a main result, for the membrane setup investigated, the spontaneous curvature is proved to be a constant plus twice the mean curvature of the membrane in its tensionless ground state. The spontaneous curvature due to the built-in transbilayer asymmetry of the membrane in terms of lipid shape is studied by the proposed method. A linear dependence of the spontaneous curvature with respect to the head-bead diameter difference and the lipid mixing ratio is discovered. The consistency with the theoretical results provides evidence supporting the validity of our method.