Abstract. Forman's discrete Morse theory is studied from an algebraic viewpoint, and we show how this theory can be extended to chain complexes of modules over arbitrary rings. As applications we compute the homologies of a certain family of nilpotent Lie algebras, and show how the algebraic Morse theory can be used to derive the classical Anick resolution as well as a new two-sided Anick resolution.