Accurate ab initio quantum-mechanical calculations are presented for the molecular and dissociative adsorption of ammonia on the pure and Li-doped MgO(001) surface, and also for the hydrogen abstraction from ammonia on gas-phase LiO. The surface is described in terms of embedded clusters. In its most stable physisorbed state the ammonia is found to be doubly coordinated, with the electrostatic attraction to a cation being the important feature for bonding. Heterolytic dissociation of the N-H bond is neither found to be feasible on the pure MgO(001) surface nor on the Li-doped surface. Likewise, no hydrogen abstraction from ammonia takes place on the perfect (001) surface. On the Li-doped surface, partial optimization of the transition state renders a low reaction barrier of 7 kcal/mol for the dissociative adsorption of ammonia. The gas-phase hydrogen abstraction starting from free reactants may take place with no barrier to a product LiOH-NH2 complex. However, the oxide, and from this state the reaction barrier is 13 kcal/mol. The end-on abstraction, having as products gas-phase LiOH and NH2, has a barrier of 11 kcal/mol.