Context. With Herschel, we can for the first time observe a wealth of high-J CO lines in the interstellar medium with a high angular resolution. These lines are specifically useful for tracing the warm and dense gas and are therefore very appropriate for a study of strongly irradiated dense photodissocation regions (PDRs). Aims. We characterize the morphology of CO J = 19-18 emission and study the high-J CO excitation in a highly UV-irradiated prototypical PDR, the Orion Bar. Methods. We used fully sampled maps of CO J = 19-18 emission with the Photoconductor Array Camera and Spectrometer (PACS) on board the Herschel Space Observatory over an area of ∼110 × 110 with an angular resolution of 9 . We studied the morphology of this high-J CO line in the Orion Bar and in the region in front and behind the Bar, and compared it with lower-J lines of CO from J = 5-4 to J = 13-12 and 13 CO from J = 5-4 to J = 11-10 emission observed with the Herschel Spectral and Photometric Imaging Receiver (SPIRE). In addition, we compared the high-J CO to polycyclic aromatic hydrocarbon (PAH) emission and vibrationally excited H 2 . We used the CO and 13 CO observations and the RADEX model to derive the physical conditions in the warm molecular gas layers. Results. The CO J = 19-18 line is detected unambiguously everywhere in the observed region, in the Bar, and in front and behind of it. In the Bar, the most striking features are several knots of enhanced emission that probably result from column and/or volume density enhancements. The corresponding structures are most likely even smaller than what PACS is able to resolve. The high-J CO line mostly arises from the warm edge of the Orion Bar PDR, while the lower-J lines arise from a colder region farther inside the molecular cloud. Even if it is slightly shifted farther into the PDR, the high-J CO emission peaks are very close to the H/H 2 dissociation front, as traced by the peaks of H 2 vibrational emission. Our results also suggest that the high-J CO emitting gas is mainly excited by photoelectric heating. The CO J = 19-18/J = 12-11 line intensity ratio peaks in front of the CO J = 19-18 emission between the dissociation and ionization fronts, where the PAH emission also peak. A warm or hot molecular gas could thus be present in the atomic region where the intense UV radiation is mostly unshielded. In agreement with recent ALMA detections, low column densities of hot molecular gas seem to exist between the ionization and dissociation fronts. As found in other studies, the best fit with RADEX modeling for beam-averaged physical conditions is for a density of 10 6 cm −3 and a high thermal pressure (P/k = n H × T ) of ∼1-2 × 10 8 K cm −3 . Conclusions. The high-J CO emission is concentrated close to the dissociation front in the Orion Bar. Hot CO may also lie in the atomic PDR between the ionization and dissociation fronts, which is consistent with the dynamical and photoevaporation effects.