A measurement of the b-hadron production cross section in proton-proton collisions at √s = 7TeV is presented. The dataset, corresponding to 85 nb−1, was recorded with the CMS experiment at the LHC using a low-threshold single-muon trigger. Events are selected by the presence of a muon with transverse momentum pμT>6 GeV with respect to the beam direction and pseudorapidity |ημ| < 2.1. The transverse momentum of the muon with respect to the closest jet discriminates events containing b hadrons from background. The inclusive b-hadron production cross section is presented as a function of muon transverse momentum and pseudorapidity. The measured total cross section in the kinematic acceptance is σ(pp → b + X → μ + X′) = 1.32 ± 0.01(stat) ± 0.30(syst) ± 0.15(lumi)μb.