To each associative ring R we can assign the adjoint Lie ring R(-) (with the operation (a, b) = ab - ba) and two semigroups, the multiplicative semigroup M(R) and the associated semigroup A(R) (with the operation a o b = ab + a + b). It is clear that a Lie ring R(-) is commutative if and only if the semigroup M(R) (or A(R)) is commutative. In the present paper we try to generalize this observation to the case in which R(-) is a nilpotent Lie ring. It is proved that if R is an associative algebra with identity element over an infinite field F, then the algebra R(-) is nilpotent of length c if and only if the semigroup M(R) (or A(R)) is nilpotent of length c (in the sense of A. I. Mal'tsev or B. Neumann and T. Taylor). For the case in which R is an algebra without identity element over F, this assertion remains valid for A(R), but fails for M(R). Another similar results are obtained.