In complete generality the ideal $\mathcal I$ won't be quasi-coherent. If $f$ is quasi-compact and quasi-separated, then $f_*$ of any quasi-coherent sheaf is quasi-coherent (a simple general fact), and so $\mathcal I$, being the kernel of the morphism $\mathcal O_X \to f_*\mathcal O_Z$, is quasi-coherent.
Actually, if $f$ is quasi-compact, this already suffices to show that $\mathcal I$ is quasi-coherent. To see this, we can work locally on the target, as you note, and hence assume that $X$ is affine. Then by the definition of $f$ being quasi-compact, we may cover $Z$ by finitely many open affines $U_i$. Let $Z'$ denote the disjoint union of the $U_i$; then $Z'$ is affine, and we have a composite map $f':Z' \to Z \to X$. It is easy to check that the kernel $\mathcal I$ for $f$ and the kernel $\mathcal I'$ for $f'$ coincide, so we reduce to checking quasi-coherence for the map $f'$, which is both quasi-compact and quasi-coherent (indeed, it is just a map of affine schemes, and we are in the context of Darius Math's answer).
Also:
If $Z$ is reduced, then we can see that $\mathcal I$ is just the ideal sheaf
of the closure of the image of $f$, given its induced reduced structure.
So to get a counterexample to quasi-coherence, we need to consider a non-quasi-compact $f$ with non-reduced source.
Here is one:
$Z =$ disjoint union over $n \geq 1$ of Spec $k[t]/(t^n)$,
$X = \mathbb A^1$ Spec $k[t]$, and $Z \to X$ given by the obvious closed immersions on
each connected component of $Z$.
The sheaf $\mathcal I$ coincides with the structure sheaf on the complement of the origin in $\mathbb A^1$, but has vanishing stalk at the origin.
If you want a written account of all this, one place is Ravi Vakil's book.