Bubble HCl gas (or add concentrated HCl carefully) into the aqueous methylamine.
You’ll get methylamine hydrochloride, a solid that is water-soluble but can be dried.
Filter and dry the methylamine hydrochloride under vacuum or in a desiccator.
Keep temperature low (<50 °C) to avoid decomposition.
Heat the dry methylamine hydrochloride with strong base (like NaOH or KOH) in a suitable setup.
This liberates anhydrous methylamine gas, which can be condensed into a dry solvent or trapped in an appropriate reaction vessel.
OR
In some protocols, aqueous methylamine is distilled into an anhydrous solvent under vacuum.
For example, distill into dry ethanol, THF, or toluene, forming a solution of methylamine in that solvent.
Requires specialized glassware and careful moisture-free conditions.