In this paper, we prove a series of results on group embeddings in groups with a small number of generators. We show that each finitely generated group G lying in a variety M can be embedded in a 4-generated group H is an element of MA (A means the variety of abelian groups). If G is a finite group, then H can also be found as a finite group. It follows, that any finitely generated (finite) solvable group G of the derived length l can be embedded in a 4-generated (finite) solvable group H of length l + 1. Thus, we answer the question of V. H. Mikaelian and A. Yu. Olshanskii. It is also shown that any countable group G is an element of M, such that the abelianization G(ab) is a free abelian group, is embeddable in a 2-generated group H is an element of MA.