A synthesis of N-monodeuteriomethyl-2-substituted piperidines is described. An efficient and readily scalable anodic methoxylation of N-formylpiperidine in an undivided microfluidic electrolysis cell delivers methoxylated piperidine 3, which is a precursor to a N-formyliminium ion and enables C-nucleophiles to be introduced at the 2-position. The isotopically labelled N-deuteriomethyl group is installed using the Eschweiler-Clarke reaction with formic acid-d2 and unlabelled formaldehyde. Monodeuterated N-methyl groups in these molecular systems possess small isotropic proton chemical shift differences important in the investigation of molecules that are able to support long-lived nuclear spin states in solution nuclear magnetic resonance.