No, there is no counterexample; we always have $\mathrm{nil}(R[x])=\mathrm{nil}(R)[x]$. This is given as exercise $2.$(ii) in chapter 1 of Atiyah-Macdonald:

To prove the inclusion you're wondering about, you can proceed by induction on the degree of the nilpotent polynomial:
If $p\in \mathrm{nil}(R[x])$ is of degree 0, then $p=a_0$ for some $a_0\in R$, and clearly $a_0\in\mathrm{nil}(R)$, so the claim is true for polynomials of degree 0. Suppose the claim is true for $p\in\mathrm{nil}(R[x])$ of degree $\leq n.$
Let $p=a_0+\cdots+a_{n+1}x^{n+1}\in\mathrm{nil}(R[x])$ be of degree $n+1$, say with $p^m=0$. For any $r$, the leading coefficient of $p^r$ is always $a_{n+1}^r$; since $p^m=0$, we must have $a_{n+1}^m=0$, so that $a_{n+1}$ is nilpotent, and hence $a_{n+1}x^{n+1}$ is nilpotent. Since $\mathrm{nil}(R[x])$ is an ideal, we have that $p-a_{n+1}x^{n+1}\in\mathrm{nil}(R[x])$, which is of degree $\leq n$, and therefore the inductive hypothesis implies all of its coefficients are nilpotent. Thus, all of the coefficients of $p$ are nilpotent, and by induction, we are done.