The answer is no. Consider the complex over the integers $A$ which is $\mathbb Z$ in degree $-1$$0$ and $0$$1$ and the only non-trivial differential being multiplication by $2$ and let $B$ be the same complex shifted once to the rightleft (so that it is $\mathbb Z$ in degrees $0$$-1$ and $1$$0$). We have a map of complexes $A \to B$ which is the identity in degree $0$ and (necessarily) zero in all other degrees. This induces zero in cohomology (for trivial reasons) but is not null homotopic. (This is easily seen by an explicit calculation. Abstractly however it has to do with the fact that it realises the non-zero element of $\mathrm{Ext}^1_{\mathbb Z}(\mathbb Z/2,\mathbb Z/2)$.)