A group in which every proper subgroup is contained in a maximal subgroup

Solution 1:

No. For instance, let $G$ be a vector space over $\mathbb{F}_p$ for some prime $p$. Then every proper subgroup (i.e., subspace) is contained in a maximal subgroup (i.e., codimension 1 subspace) but $G$ is not finitely generated unless it is finite dimensional.

Solution 2:

It will work when the number of maximal subgroups is finite. Then we can assume that $M_1, \dots M_n$ are all maximal subgroups in $G$. There exists $x_i \notin M_i$ as each $M_i$ is a maximal subgroup ($M_i$ is a proper subgroup of $G$). Now the group generated by $x_i$ is not contained in any of $M_i$, thus should not be a proper subgroup because of the assumption. As a result, we have: $$ \langle x_1, x_2, \dots,x_n \rangle = G $$ We will have such a condition; for example, when all of the maximal subgroups are finite index and conjugate to each other.