A measurement of the underlying event (UE) activity in proton–proton collisions at a center-of-mass energy of 7 TeV is performed using Drell–Yan events in a data sample corresponding to an integrated luminosity of 2.2 fb−1, collected by the CMS experiment at the LHC. The activity measured in the muonic final state ( qq−→μ+μ− ) is corrected to the particle level and compared with the predictions of various Monte Carlo generators and hadronization models. The dependence of the UE activity on the dimuon invariant mass is well described by pythia and herwig++ tunes derived from the leading jet/track approach, illustrating the universality of the UE activity. The UE activity is observed to be independent of the dimuon invariant mass in the region above 40 GeV/c 2, while a slow increase is observed with increasing transverse momentum of the dimuon system. The dependence of the UE activity on the transverse momentum of the dimuon system is accurately described by madgraph, which simulates multiple hard emissions.