The ratio of the Λ0b baryon lifetime to that of the B¯¯¯0 meson is measured using 1.0 fb−1 of integrated luminosity in 7 TeV center-of-mass energy pp collisions at the LHC. The Λ0b baryon is observed for the first time in the decay mode Λ0b→J/ψpK−, while the B¯¯¯0 meson decay used is the well known B¯¯¯0→J/ψπ+K− mode, where the π+K− mass is consistent with that of the K¯¯¯*0(892) meson. The ratio of lifetimes is measured to be 0.976±0.012±0.006, in agreement with theoretical expectations based on the heavy quark expansion. Using previous determinations of the B¯¯¯0 meson lifetime, the Λ0b lifetime is found to be 1.482±0.018±0.012 ps. In both cases, the first uncertainty is statistical and the second systematic.