Comets are believed to be born in the outer Solar system where the temperature is assumed to have never exceeded T ∼ 100 K. Surprisingly, observations and samples of cometary dust particles returned to Earth showed that they are in fact made of a mix of ices, as expected, but also of materials forged at high temperatures (T ∼ 1500 K). We propose a radically new view regarding the origin of the high-temperature processed materials in comets, based on the recent ‘tidal downsizing’ hypothesis for planet formation. In the latter, the outer protoplanetary disc is gravitationally unstable and forms massive giant planet embryos (GEs). These hot (T ∼ 100–2000 K) and dense regions, immersed in the background cold and low-density disc, are eventually disrupted. We propose that both planets and the high-temperature materials in comets are synthesized inside the GEs. Disruption of GEs separates planets and small solids as the latter are ‘frozen-in’ into gas and are peeled off together with it. These small solids are then mixed with the ambient cold disc containing ices before being incorporated into comets. Several predictions of this picture may be testable with future observations of the exoplanets.