The Beckmann rearrangement is a reaction in which a ketone is first converted to an oxime, which, under acidic or Lewis acidic conditions, rearranges into an amide. This reaction is closely related to the Hofmann, Schmidt, and Curtius rearrangements, as all involve the formation of an electron-deficient nitrogen species that triggers the migration of an alkyl group.

The Mechanism of Beckmann Rearrangement
The Beckmann rearrangement begins with the conversion of the ketone into an oxime through reaction with hydroxylamine (NH₂OH). After protonation, the oxime’s hydroxyl group becomes a better leaving group, allowing for the elimination of water and the formation of a nitrilium ion intermediate, which undergoes a 1,2-shift of the R group that is anti (trans) to the hydroxyl group. This migration forms the C-N bond that is eventually part of the final product amide.

The electrophilic intermediate shown in brackets is a nitrilium ion, which is attacked by water, generating an imidic acid intermediate. This then tautomerizes to the more stable amide form.
Beckmann rearrangement is not the only way of converting ketones to amides, so check this article to learn about other strategies.
The Regiochemistry of Beckmann Rearrangement
How do we know which of these is going to migrate and make the new C-O bond? This is defined by the migratory aptitude of the alkyl groups connected to the carbonyl. It has been found that tertiary alkyl groups migrate the fastest, followed by secondary, and then aryl groups. In case we are doing a Baeyer-Villiger on an aldehyde, keep in mind that hydrogen would go before the tertiary alkyl group: H > tertiary > secondary > aryl > primary > methyl.
See the last two examples in the first image, where unsymmetrical ketones are subjected to a Beckmann rearrangement.
Another question that may arise is: what happens if the group with lower migratory aptitude is positioned trans to the OH group? One important factor to consider is that oximes can undergo E/Z isomerization, especially under acidic conditions. This interconversion allows for the formation of both stereoisomers, potentially leading to a mixture of amide products. As a result, the rearrangement may still favor the amide derived from the group with higher migratory aptitude, depending on the equilibrium distribution of the oxime isomers.
Aldehydes in Beckmann Rearrangement
If an aldehyde is used instead of a ketone, a nitrile will be formed because of the greater migratory aptitude of hydrogen:

That covers everything I wanted to share about the Beckmann rearrangement. As always, let me know in the comments if you have any questions.
Reference
March’s Advanced Organic Chemistry
Strategic Applications of Named Reactions in Organic Synthesis
Beckmann rearrangement catalysis: A Review of Recent Advances – New J. Chem., 2020,44, 18530-18572
