We present a simple model of voluntary groups in a collective action problem where individuals differ in their willingness to cooperate. The heterogeneity of individuals' preferences generally yields multiple equilibrium groups with different levels of cooperation. Voluntary participation in a binding contract to cooperate does not necessarily lead to the full cooperation. Applications to voluntary provision of public goods and cartel formation in oligopolistic markets are discussed.