The interface of high-quality crystalline silicon/hydrogenated amorphous silicon (c-Si/a-Si:H) is indispensable for achieving the ideal conversion efficiency of Si heterojunction solar cells. Therefore, it is extremely desirable to characterize and control the interface at the atomic scale. Here, we employ spherical aberration-corrected transmission electron microscopy to investigate the atomic structure of the c-Si/a-Si:H interface in high-efficiency Si heterojunction solar cells. Their structural evolution during in situ annealing is visualized at the atomic scale. High-density embedded nanotwins, detrimental to the device performance, are identified in the thin epitaxial layer between c-Si and a-Si:H. The nucleation and formation of these nanotwins are revealed via ex situ and in situ high-resolution transmission electron microscopy. Si heterojunction solar cells with low-density nanotwins are fabricated by introducing an ultra-thin intrinsic a-Si:H buffer layer and show better performance, indicating that the strategy to restrain embedded nanotwins can further enhance the conversion efficiency of Si heterojunction solar cells.