Ok, going off my second comment from above, in exercise 9 from section 4.2 Hatcher gives a hint that solves your problem. Let $X$ be an acyclic CW-complex which isn’t contractible (I'll give an example below to be complete). Let $f: X \rightarrow *$. The mapping cone of this is $SX$, the suspension of $X$. Exercise 8 of section 4.2 proves that $SX$ is contractible because $X$ is acyclic. But the map $X \rightarrow *$ is not a homotopy equivalence.
Solution to Exercise 8: Suppose $\tilde{H}_*(X)=0$. From $H_0$ we see $X$ is path connected, so $SX$ is simply connected. Thus $H_* (SX) = 0 $ . By the Hurewicz theorem $\pi_*(SX)=0$ so $SX$ is contractible as desired.
An acyclic CW-complex which is not contractible (thanks to link)... Let $a$ and $b$ be the two loops in $X=S^1 \vee S^1$. Glue in two 2-cells along the words $a^5b^{-3}$ and $b^3(ab)^{-2}$. Then $\pi_1(X) = \langle a,b|a^5b^{-3},b^3(ab)^{-2}\rangle$ and this surjects onto the symmetry group of a regular dodecahedron (so $\pi_1(X)\not \cong 0$) while $H_1(X)$ is trivial because it's the abelianization and playing with symbols lets you reduce those relations to $H_1(X) \cong \langle a,b | a,b\rangle \cong 0$. It's clear that $H_n(X)\cong 0$ for $n>1$ because of the dimensions of the cells involved.