To obtain the result $\frac{\text d \rho }{\text d t}=0$ you need two facts: the first is that the hamiltonian flow preserves the volume of phase space. The second fact is the conservation of probability, that is, the probability that the system is found in a volume $U$ at time $t=0$ equals the probability of finding it within $\Phi _t U$ at time $t$, where $\Phi _t$ denotes the hamiltonian flow. This is a direct consequence of the deterministic nature of classical mechanics: the two propositions “$(p(0),q(0))\in U$” and “$(p(t),q(t))\in \Phi _t U$” are equivalent.
Using conservation of probability, for an arbitrary volume $U$ we can write an equation: $$\int _U \rho(p,q,0) \text d p \text d q=\int _{\Phi _t U} \rho(p,q,t)\text dp \text d q .$$
By Jacobi's theorem: $$\int _{\Phi_t U} \rho (p,q,t)\text d p \text d q=\int _U\rho (\Phi _t (p,q),t)\text J_{\Phi _t}d p \text d q.$$
The Jacobian $J_{\Phi _t}=1$, because the flow preserves volumes. It follows that: $$\int _U \rho (p,q,0)\text d p \text d q =\int _U \rho (\Phi _t (p,q),t)\text d p \text d q,$$
and, since the volume $U$ was arbitrary, $\rho (p,q,0)=\rho (\Phi _t (p,q),t)$, or $\text d\rho /\text d t=0$.