Oumuamua was discovered passing through our Solar System on a hyperbolic orbit. It presents an apparent contradiction, with colors similar to those of volatile-rich Solar System bodies but with no visible outgassing or activity during its close approach to the Sun. Here we show that this contradiction can be explained by the dynamics of planetesimal ejection by giant planets. We propose that Oumuamua is an extinct fragment of a comet-like planetesimal born in a planet-forming disk that also formed Neptune- to Jupiter-mass giant planets. On its pathway to ejection Oumuamuas parent body underwent a close encounter with a giant planet and was tidally disrupted into small pieces, similar to comet Shoemaker-Levy 9s disruption after passing close to Jupiter. We use dynamical simulations to show that 0.1-1% of cometary planetesimals undergo disruptive encounters prior to ejection. Rocky asteroidal planetesimals are unlikely to disrupt due to their higher densities. After disruption, the bulk of fragments undergo enough close passages to their host stars to lose their surface volatiles and become extinct. Planetesimal fragments such as Oumuamua contain little of the mass in the population of interstellar objects but dominate by number. Our model makes predictions that will be tested in the coming decade by LSST.