We apply state of the art electronic structure techniques, based on hybrid exchange-functionals in DFT and periodic boundary conditions, to unravel the reaction mechanism responsible for the initial stages of the aerobic oxidation of hydrocarbons catalyzed by Mn-doped aluminophosphates. In this preactivation step of the catalyst, which precedes the catalytic propagation cycle in which the final oxidation products (alcohol, aldehyde, and carboxylic acid) are formed, the MnIII ions initially present in the activated (calcined) catalyst are transformed by interaction with one alkane and one O2 molecule into new Mn-bearing species: a reduced MnII site and a MnIII···peroxo complex, which are active for the subsequent propagation cycle. The preactivation step has a high activation energy, calculated as 135 kJ/mol, explaining the long induction time observed experimentally. Our results further show that MnIII sites are able to produce the hydroperoxide intermediate from the reactants; however, this intermediate can be transformed into the oxidative products only through reduced MnII sites. The latter are formed from MnIII in the preactivation step, via a H-abstraction from the hydrocarbon, also yielding an alkyl radical (R•) that subsequently adds O2 in a stereospecific way to form a free peroxo radical, ROO•. Migration of ROO• in the AlPO nanopores frees MnII for the propagation cycle and forms MnIII···ROO• complexes also needed for propagation. We demonstrate the essential role of MnIII active sites at the initial stages of the reaction for activating the hydrocarbon molecules; such hydrocarbon activation catalyzed by Mn requires much lower activation energies than through noncatalytic pathways, where the hydrocarbon is activated by O2 alone.