Context. In the deeply embedded stage of star formation, protostars start to heat and disperse their surrounding cloud cores. The evolution of these sources has traditionally been traced through dust continuum spectral energy distributions (SEDs), but the use of CO excitation as an evolutionary probe has not yet been explored due to the lack of high-J CO observations. Aims. The aim is to constrain the physical characteristics (excitation, kinematics, column density) of the warm gas in low-mass protostellar envelopes using spectrally resolved Herschel data of CO and compare those with the colder gas traced by lower excitation lines. Methods. Herschel-HIFI observations of high-J lines of 12 CO, 13 CO, and C 18 O (up to J u = 10, E u up to 300 K) are presented toward 26 deeply embedded low-mass Class 0 and Class I young stellar objects, obtained as part of the Water In Star-forming regions with Herschel (WISH) key program. This is the first large spectrally resolved high-J CO survey conducted for these types of sources. Complementary lower J CO maps were observed using ground-based telescopes, such as the JCMT and APEX and convolved to matching beam sizes. Results. The 12 CO 10-9 line is detected for all objects and can generally be decomposed into a narrow and a broad component owing to the quiescent envelope and entrained outflow material, respectively. The 12 CO excitation temperature increases with velocity from ∼60 K up to ∼130 K. The median excitation temperatures for 12 CO, 13 CO, and C 18 O derived from single-temperature fits to the J u = 2-10 integrated intensities are ∼70 K, 48 K and 37 K, respectively, with no significant difference between Class 0 and Class I sources and no trend with M env or L bol . Thus, in contrast to the continuum SEDs, the spectral line energy distributions (SLEDs) do not show any evolution during the embedded stage. In contrast, the integrated line intensities of all CO isotopologs show a clear decrease with evolutionary stage as the envelope is dispersed. Models of the collapse and evolution of protostellar envelopes reproduce the C 18 O results well, but underproduce the 13 CO and 12 CO excitation temperatures, due to lack of UV heating and outflow components in those models. The H 2 O 1 10 − 1 01 /CO 10-9 intensity ratio does not change significantly with velocity, in contrast to the H 2 O/CO 3-2 ratio, indicating that CO 10-9 is the lowest transition for which the line wings probe the same warm shocked gas as H 2 O. Modeling of the full suite of C 18 O lines indicates an abundance profile for Class 0 sources that is consistent with a freeze-out zone below 25 K and evaporation at higher temperatures, but with some fraction of the CO transformed into other species in the cold phase. In contrast, the observations for two Class I sources in Ophiuchus are consistent with a constant high CO abundance profile. Conclusions. The velocity resolved line profiles trace the evolution from the Class 0 to the Class I phase through decreasing line intensities, less prominent outflow...