The first discovered interstellar object (ISO), ‘Oumuamua (1I/2017 U1) shows a dry and rocky surface, an unusually elongated shape, with short-to-long axis ratio c∕a ≲ 1∕6, a low velocity relative to the local standard of rest (~10 km s−1), non-gravitational accelerations and tumbles on a timescale of a few hours1,2,3,4,5,6,7,8,9. The inferred number density (~3.5 × 1013−2 × 1015 pc−3) for a population of asteroidal ISOs10,11 outnumbers cometary ISOs12 by ≥103, in contrast to the much lower ratio (≲10−2) of rocky/icy Kuiper belt objects13. Although some scenarios can cause the ejection of asteroidal ISOs14,15, a unified formation theory has yet to comprehensively link all ‘Oumuamua’s puzzling characteristics and to account for the population. Here we show by numerical simulations that ‘Oumuamua-like ISOs can be prolifically produced through extensive tidal fragmentation and ejected during close encounters of their volatile-rich parent bodies with their host stars. Material strength enhanced by the intensive heating during periastron passages enables the emergence of extremely elongated triaxial ISOs with shape c∕a ≲ 1∕10, sizes a ≈ 100 m and rocky surfaces. Although volatiles with low sublimation temperature (such as CO) are concurrently depleted, H 2 O buried under surfaces is preserved in these ISOs, providing an outgassing source without measurable cometary activities for ‘Oumuamua’s non-gravitational accelerations during its passage through the inner Solar System. We infer that the progenitors of ‘Oumuamua-like ISOs may be kilometre-sized long-period comets from Oort clouds, kilometre-sized residual planetesimals from debris disks or planet-sized bodies at a few astronomical units, orbiting around low-mass main-sequence stars or white dwarfs. These provide abundant reservoirs to account for ‘Oumuamua’s occurrence rate.