The sequence that brings matter from a molecular cloud to a fully developed star plus planetary system seems to be a unique and rich chemistry laboratory where, step by step, molecular complexity increases. During the cold pre-collapse phase, atoms and simple molecules, like CO, freeze out onto the dust grains, forming icy mantles. Reactions on the grain surfaces likely form hydrogenated molecules (notably H2O, CH4, H2CO, CH3OH, and NH3) and perhaps even more complex organic molecules. The hallmark of this era is the super-deuteration phenomenon, i. e. the abnormal enhancement of molecules containing one or more D atoms instead of H atoms, by up to 13 orders of magnitude with respect to the cosmic elemental D/H ratio (~10−5). The frozen molecules are released into the gas upon warming by the forming star and undergo reactions which further increase the molecular complexity, leading to several complex organic molecules. Products of this efficient chemical factory are observed in the hot corinos, which are warm (~100 K), dense (~107–108 cm−3) solar-system-sized regions at the centre of the collapsing envelopes of solar type protostars. In this contribution, I review what is known about the organic molecules in protostellar environments, with emphasis on the hot corinos, and how possibly the organic molecules formed at this stage may constitute an heritage for the forming planetary system.