If a nilpotent group has an element of prime order $p$, so does its centre. This is Exercise 5.2.1 of Robinson's, "A Course in the Theory of Groups (Second Edition)". According to Approach0, it is new to MSE. The closest I could find is the following:
Prove that in a nilpotent group every normal subgroup of prime order is contained in the center.
The Details:
(This can be skipped.)
Robinson's definition of the following is equivalent to the one given on proof wiki:

Let $G$ be a group whose identity is $e$.
A normal series for $G$ is a sequence of normal subgroups of $G$:
$$\{e\}=G_0\lhd G_1\lhd\dots\lhd G_n=G,$$
where $G_{i-1}\lhd G_i$ denotes that $G_{i-1}$ is a proper normal subgroup of $G_i$.

On page 122 of Robinson's book,

Definition: A group $G$ is called nilpotent if it has a central series, that is, a normal series $1=G_0\le G_1\le \dots \le G_n=G$ such that $G_{i+1}/G_i$ is contained in the centre of $G/G_i$ for all $i$. The length of a shortest central series of $G$ is the nilpotent class of $G$.

The Question:

If a nilpotent group has an element of prime order $p$, so does it (sic) centre.

Thoughts:
Let's denote by $g$ the element of $G$ of order $p$.

I'm not particularly well-versed in nilpotent groups.

Cauchy's Theorem for groups springs to mind:

Theorem (Cauchy): For a finite group $G$, if a prime $p$ divides $\lvert G\rvert$, then $G$ has an element of order $p$.

I don't know whether it would help. I doubt it. There's nothing to say $G$ in the question is finite.

If $G$ is abelian, then $G=Z(G)$, so the question is trivial in this case.

Examples of infinite, nonabelian nilpotent groups can be found here.

An example of a nonabelian, nilpotent finite group is the quaternion group $Q_8$. Its order is $8$, so Cauchy's Theorem suggests that $Q_8$ has an element of order two. It is not difficult to see that that element is $-1$. We have $Z(Q_8)=\{1,-1\}$. So the result holds here.

The last time I gave Robinson's book a good read was about three weeks ago. I need to get stuck in again if I stand a chance of doing the exercises.
I have an exam coming up in a few weeks, too, so I can't give each exercise as much time as I would normally.

Please help :)
 A: In the proof of 5.2.7 is proven that, for all primes $p$, $G$ has a $p$-subgroup containing all $p$-subgroups of $G$, say $K(p)$. Then $K(p)$ is clearly a characteristic subgroup of $G$, in particular, $K(p)$ is a normal subgroup of $G$. If $G$ has an element of order $p$, $p$ a prime, then $K(p)\neq1$. But $G$ is nilpotent and so there exists $i\geqslant1$ such that $$[K(p),\underbrace{G,\ldots,G}_{i}]=1.\tag{1}$$ If $K(p)\leq Z(G)$ we get the result. On the other hand, if $K(p)\nleq Z(G)$, then let $i_0$ be the least positive integer such that $(1)$ holds. Thus $i_0>1$ and
$$H=[K(p),\underbrace{G,\ldots,G}_{i_0-1}]\neq1.$$
Finally, $H\leq Z(G)$ since $[H,G]=1$.
A: It is also not too hard to prove this statement directly by induction on the nilpotency class of $G$:
If the nilpotency class is 0 or 1, there is nothing to show, as $G$ is abelian in this case. So let the class of $G$ be greater than 1, and let $a \in G$ be any element of order $p$. If $a$ is in $Z(G)$, we are done. Otherwise, $a$ leads to an element of $G/Z(G)$ of order $p$, and by induction hypothesis we know that $G/Z(G)$ has an element of order $p$ in its centre. In other words, there is an element $b \in Z_2(G)$ such that $b \notin Z(G)$ and $b^p \in Z(G)$. Since $b$ is not in the centre of $G$, there is some $c \in G$ such that the commutator $[b,c] \in Z(G)$ is nontrivial. Now we can complete the proof by showing $[b,c]^p = [b^p,c] = 1$.
