$\newcommand{\R}{\mathbb{R}}$
$\newcommand{\phi}{\varphi}$
I will answer it for all $0 < q < \infty$, $1\le n\le p$ and all non-negative measures $\mu$. The desired inequality holds if and only if $\mu = 0$ (trivially) or $n = p = 1$ and $\mu(\R^n) < \infty$.
The idea is that while (for $\mu(\R^n) < \infty$, say) the left-hand side can be bounded from above by $\max f(x)$, for many test functions we can have a reverse inequality. So, to bound the left-hand side we essentially need to bound $\max f(x)$. If $n < p$ then we are on the wrong side of the correct scaling for the corresponding Sobolev inequality to hold, so the inequality fails, and for $n = p > 1$ it is known that the corresponding Sobolev inequality does not hold, so the inequality will again fail.
Assume first that $\mu \neq 0$, $n < p$. Fix a $C^\infty$ function $\phi:\R^n\to\R^n$ such that $\phi(x) = 1, |x| < 1$, $\phi(x) = 0, |x| > 2$. Let us check our inequality against the function $\phi_r(x) = \phi(\frac{x}{r})$ and let $r$ go to $+\infty$. The left-hand side of it tends to $\mu(\R^n)^{p/q}$ which is strictly positive since we assumed that $\mu \neq 0$. On the other hand, the right-hand side is $O(r^{n-p})$, in particular it tends to $0$. So, the inequality can not be true.
If $n = p$ and $\mu(\R^n) = +\infty$ then the same counterexample still works (regardless of if $n = 1$ or $n > 1$). Now, we will turn to the case $n = p > 1$, $0 < \mu(\R^n) < +\infty$, which requires a bit more care. Since $\mu(\R) > 0$, there exists a ball $B=B(r)$ centred around $0$ such that $\mu(B) > 0$. Pick a very big number $R > r$ and consider the function
$$f_R(x) = \begin{cases}1, |x| < r\\
1 - \frac{\log(\log(\frac{ex}{r}))}{\log(\log(\frac{eR}{r}))}, r \le |x| \le R\\
0, |x| > R\end{cases}.$$
(this function is not techincally $C^\infty$, to make it $C^\infty$ convolve it with a very narrow mollifier)
For this function $f$ the left-hand side is at least $\mu(B)^{p/q}$ which is some positive constant, while the right-hand side is $O(\frac{1}{\log(\log(\frac{eR}{r}))})$ which tends to $0$ as $R\to +\infty$, so the inequality is again false.
Note that this example is nothing but a slight modification of the standard example showing that the Sobolev space $W^{1, n}(\R^n)$ does not embed into $C(\R^n)$.
Finally, if $n = p = 1$ and $\mu(\R) < \infty$ then the inequality is true for a simple reason: by the fundamental theorem of calculus for all $x\in \R$ we have $|f(x)| \le \int_\R |f'(t)|dt$, hence the left-hand side is at most $\mu(\R)^{p/q}\int_\R |f'(t)|dt$.