The hydrogen ion comes from the peroxyacid that is used as the oxidizing agent.
The Baeyer-Villiger reaction is the oxidation of a ketone to a carboxylic acid ester using a peroxyacid as the oxidizing agent. For example,
Commonly used peroxyacids are peroxyacetic acid, MCPBA , and peroxytrifluoroaceticacid with disodium hydrogen phosphate added as a buffer.
The mechanism is complicated and takes place in several steps.
The peroxyacid protonates the oxygen of the carbonyl group.
This makes the carbonyl carbon more electrophilic.
The peroxyacid anion attacks the carbonyl carbon to form a so-called Criegee intermediate.
The Criegee intermediate decomposes. As a carboxylate ion leaves, an alkyl group migrates to the adjacent O atom.
Finally, the carboxylate ion deprotonates the cation to produce the ester and a carboxylic acid.