We have investigated the growth of superconductive thin films of magnesium diboride (MgB2) by molecular-beam epitaxy. A Si(111) substrate with a seed layer of MgO was used for the growth of these films by varying parameters such as the growth temperature, Mg:B flux ratio and deposition rate as well as the background pressure. It was found that highly crystallized films could already form at 250 °C; however, only in a narrow window of growth parameters. The highest critical temperature of 35.2 K with a sharp transition (TC of 0.5 K) was observed for films grown at 300 °C. Using a capping layer of MgO proved to be highly beneficial for the preservation and the smoothness of these films. Together with the fact that MgO proved to be a good seed layer for thin films of MgB2 makes it an ideal candidate for growing all epitaxial MgB2 Josephson junctions. ©2002 American Institute of Physics.