  Classical hot cores are rich in molecular emission, and they show a high
abundance of complex organic molecules (COMs). The emergence of molecular
complexity is poorly constrained in the early evolution of hot cores. Using the
Atacama Large Millimeter Array we put observational constraints on the physical
location of COMs in a high-mass protostellar envelope associated with the
G328.2551-0.5321 clump. The protostar is single down to ~400au scales and we
resolve the emission region of COMs. Using thermodynamic equilibrium modelling
of the available 7.5 GHz bandwidth around ~345 GHz, we detect emission from 10
COMs, and identify a line of deuterated water (HDO). The most extended emission
originates from methanol, methyl formate and formamide. Together with HDO,
these molecules are found to be associated with both the accretion shocks and
the inner envelope, for which we estimate a moderate temperature of $T_{\rm
kin}\sim$110 K. Our findings reveal a significant difference in the
distribution of COMs. O-bearing COMs, such as ethanol, acetone, and ethylene
glycol are almost exclusively found and show a higher abundance towards the
accretion shocks with $T_{\rm kin}\sim$180 K. Whereas N-bearing COMs with a CN
group, such as vinyl and ethyl cyanide peak on the central position, thus the
protostar and the accretion disk. This is the first observational evidence for
a large column density of COMs seen towards accretion shocks at the centrifugal
barrier at the inner envelope. Since the molecular composition is dominated by
that of the accretion shocks and the radiatively heated hot inner region is
very compact, we propose this source to be a precursor to a classical,
radiatively heated hot core.
