There are two issues, really. The first is that it is an extremely bad idea to redefine basic TeX and LaTeX macros unless you absolutely know what you are doing.
The second is that \; is not valid outside maths mode.
Perhaps you want something like
\documentclass{article}
\begin{document}
\newcommand{\drm}{\ensuremath{\;\mathrm{d}}}
\drm
\end{document}
EDIT
This is a response to the OP's comment
@YanZhou aha! it was another package. Turns out hyperref redefines
them.
NO! It is not. hyperref is not doing this at all. Describing it this way is just wrong. I cannot emphasise this strongly enough: hyperref is not redefining these macros.
Redefining \d to be \mathrm{d} or making \a or \c into macros for vectors is not at all like what a package such as hyperref is doing.
What we see in hyperref's puenc.def, for example, are lines such as
\DeclareTextCommand{\d}{PU}[1]{#1\83\043}% U+0323
and
\DeclareTextCompositeCommand{\d}{PU}{\@empty}{\textdotbelow}%
These are telling TeX what \d does when the PU encoding is being used. This is fine because this macro is designed to be encoding-dependent. This is what you are meant to do if you are writing a new encoding which should support \d.
hyperref is not redefining \d. This is (or should be!) a new definition because the PU encoding doesn't even exist until hyperref sets it up.
What hyperref is doing, rather, is defining a new output encoding. Output encodings have to define certain things and may define more. hyperref is not overwriting existing definitions because the definitions it gives for \c and \d are part of the definition of the new encoding and that encodings definitions are isolated from the definitions of the same macros for other encodings.
That is, what hyperref is doing is fine. What you are trying to do is a Very Bad Idea. It is a Very Bad Idea precisely because these kinds of macros play a fundamental role in the typesetting process and redefining them will come back to bite you sooner or later.
\cwas predefined by tex for another purpose and possibly redefined by packages likefontspec. It is generally a very bad idea to define a global single letter macro in latex (or any programming language for that matter) – Yan Zhou Jun 23 '16 at 00:55hyperrefis absolutely 100% not doing that. Please see my answer below. You are overwriting basic macros at your peril.hyperrefis not overwriting anything. If you were lucky, it would overwrite your redefinitions. Unfortunately, that is not happening - at least, not reliably, anyway. – cfr Jun 23 '16 at 02:09