ANSWER:

Removing it completely with a razor is mutilation. If you mean trimming it with a machine which doesn’t completely remove it, this is permissible.

Is it permissible to trim the moustache with a razor? By trimming I mean removing some hairs of the moustache with a razor blade, not completely shave it including the hair roots.