The phenomena that accompany the growth of aluminum nitride (AlN) by metal-organic molecular beam epitaxy with trimethylaluminum and ammonia as sources of aluminum and nitrogen, respectively, have been systematically investigated. Optimizing the growth temperature, flux ratios, and the ammonia injector temperature, we obtained an efficient growth with a rate of 500 nm/h and a low consumption of ammonia. Layers of AlN with x-ray diffraction linewidth as low as 141 arcsec for the (0002) reflection, and 800 arcsec for the (11-24) reflection are demonstrated on Si(111) substrates. High temperatures of ammonia injector result in lower growth rates but facilitate transition to the two-dimensional growth. These phenomena are discussed in terms of surface hydrogen, manifested through surfactant effect, and passivation of nitrogen bonds.