In this Letter we try to search for signals generated by ultraheavy dark matter at the Large High Altitude Air Shower Observatory (LHAASO) data. We look for possible γ rays by dark matter annihilation or decay from 16 dwarf spheroidal galaxies in the field of view of the LHAASO. Dwarf spheroidal galaxies are among the most promising targets for indirect detection of dark matter that have low fluxes of astrophysical γ-ray background while having large amount of dark matter. By analyzing more than 700 days of observational data at LHAASO, no significant dark matter signal from 1 TeV to 1 EeV is detected. Accordingly we derive the most stringent constraints on the ultraheavy dark matter annihilation cross section up to EeV. The constraints on the lifetime of dark matter in decay mode are also derived.