AbstractEarth’s surface environment is largely influenced by its budget of major volatile elements: carbon (C), nitrogen (N), and hydrogen (H). Although the volatiles on Earth are thought to have been delivered by chondritic materials, the elemental composition of the bulk silicate Earth (BSE) shows depletion in the order of N, C, and H. Previous studies have concluded that non-chondritic materials are needed for this depletion pattern. Here, we model the evolution of the volatile abundances in the atmosphere, oceans, crust, mantle, and core through the accretion history by considering elemental partitioning and impact erosion. We show that the BSE depletion pattern can be reproduced from continuous accretion of chondritic bodies by the partitioning of C into the core and H storage in the magma ocean in the main accretion stage and atmospheric erosion of N in the late accretion stage. This scenario requires a relatively oxidized magma ocean ($$\log _{10} f_{{\mathrm{O}}_2}$$
log
10
f
O
2
$$\gtrsim$$
≳
$${\mathrm{IW}}$$
IW
$$-2$$
-
2
, where $$f_{{\mathrm{O}}_2}$$
f
O
2
is the oxygen fugacity, $$\mathrm{IW}$$
IW
is $$\log _{10} f_{{\mathrm{O}}_2}^{\mathrm{IW}}$$
log
10
f
O
2
IW
, and $$f_{{\mathrm{O}}_2}^{\mathrm{IW}}$$
f
O
2
IW
is $$f_{{\mathrm{O}}_2}$$
f
O
2
at the iron-wüstite buffer), the dominance of small impactors in the late accretion, and the storage of H and C in oceanic water and carbonate rocks in the late accretion stage, all of which are naturally expected from the formation of an Earth-sized planet in the habitable zone.