There is a counterexample if and only if $I$ has uncountable cofinality. I suspect this is well-known, but I couldn't find it explicitly stated in the literature, although related facts can be found.
It's closely related to the fact that $I$ has uncountable cofinality if and only if there is a "surjective" inverse system $\mathcal{X}=\{X_i,f_{ij}\}$ of nonempty sets on $I$ (i.e., one with all $f_{ij}$ surjective) that has an empty inverse limit.
This is proved in
Henkin, Leon, A problem on inverse mapping systems, Proc. Am. Math. Soc. 1, 224-225 (1950). ZBL0041.52204.
with a slightly simplified proof in this unpublished note of George Bergman, which also contains lots of other interesting related material.
If you just want one example of such an inverse system, there is a very simple one in
Waterhouse, William C., An empty inverse limit, Proc. Am. Math. Soc. 36(1972), 618 (1973). ZBL0259.54008.
[They don't write papers like that any more! Excluding title and references, it is six lines long. And it doesn't skimp on an introduction: the first two lines describe what is going to happen in the last four lines.]
Once you have such an inverse system $\mathcal{X}$, it has a surjective map to the constant inverse system $\mathcal{C}=\{C_i,g_{ij}\}$ with $C_i$ a singleton for every $i\in I$.
Now linearize: for $k$ a commutative ring form the inverse system $k\mathcal{X}=\{kX_i,\hat{f}_{ij}\}$ where $kX_i$ is the free $k$-module with basis $X_i$ and the $\hat{f}_{ij}$ are obtained by linearly extending the $f_{ij}$.
It's not too hard to check that $k\mathcal{X}$ is a surjective inverse system of $k$-modules whose inverse limit is $0$. You can find the argument in
Higman, Graham; Stone, A. H., On inverse systems with trivial limits, J. Lond. Math. Soc. 29, 233-236 (1954). ZBL0055.02503.
But now we have a surjective map $k\mathcal{X}\to k\mathcal{C}$ that can't induce a surjective map on inverse limits, since $\varprojlim k\mathcal{X}\cong0$ but $\varprojlim k\mathcal{X}\cong k$. And the kernel of $k\mathcal{X}\to k\mathcal{C}$ is also a surjective (and hence Mittag-Leffler) inverse system.