Glycinebetaine plays an important role in the protection mechanism of many plants under various stress conditions. In this study, genetically engineered maize plants with an enhanced ability to synthesise glycinebetaine (GB) were produced by introducing two genes, glycine sarcosine methyltransferase gene (ApGSMT2) and dimethylglycine methyltransferase gene (ApDMT2), from the bacterium Aphanothece halophytica. Southern blotting and RT-PCR analysis demonstrated that the two genes were integrated into the maize genome and expressed. The increased expression levels of ApGSMT2 and ApDMT2 under drought conditions facilitated GB accumulation in the leaves of transgenic maize plants and conferred improved drought tolerance. Under drought conditions, the transgenic plants showed an increased accumulation of sugars and free amino acids, greater chlorophyll content, a higher photosynthesis rate and biomass, and lower malondialdehyde and electrolyte leakage compared to the wild-type; these results suggest that GB provides vital protection against drought stress. Under normal conditions, the transgenic plants did not show decreased biomass and productivity, which indicated that the co-expression of ApGSMT2 and ApDMT2 in maize plays an important role in its tolerance to drought stress and does not lead to detrimental effects. It was concluded that the co-expression of ApGSMT2 and ApDMT2 in maize is an effective approach to enhancing abiotic stress tolerance in maize breeding programmes.