No, that's far from being true when $k$ is not a field (the assumption that $k$ is a field was added later, please see the last paragraph of my answer). Instead you have the Universal Coefficient Theorem. In the Wikipedia article this is written for topological spaces, but more generally this applies to chain complexes (the topological case being the general theorem applied to the singular chains of a space).
For example you can look at Theorem 3.6.5 in Weibel's book An introduction to homological algebra. It says that if $P$ is a chain complexes of projective $k$-modules such that $d(P_n)$ is projective for all $n$, then you have a short exact sequence for all $n$ and for all $k$-modules $M$:
$$0 \to \operatorname{Ext}^1_k(H_{n-1}(P), M) \to H^n(\operatorname{Hom}_k(P,M)) \to \operatorname{Hom}_k(H_n(P), M) \to 0.$$
Moreover this exact sequence is split hence you have a (noncanonical) isomorphism:
$$H^n(\operatorname{Hom}_k(P,M)) \cong \operatorname{Hom}_k(H_n(P), M) \oplus \operatorname{Ext}^1_k(H_{n-1}(P), M).$$
Since you're working with cochain complexes, you probably need to adapt the statement wrt. the indices a bit. If you don't have projective components for your chain complexes, then things go crazy and as far as I know the best you can hope for is a universal coefficient spectral sequence.
For a simple example, consider the chain complex such that $P_0 = P_1 = \mathbb{Z}$, $P_n = 0$ for $n \neq 0,1$, and $d : P_1 \to P_0$ is given by $d(x) = 2x$. Then $H_1(P) = 0$, but you have
$$H^1(\operatorname{Hom}_\mathbb{Z}(P, \mathbb{Z})) = \mathbb{Z}/2\mathbb{Z} \neq \operatorname{Hom}_\mathbb{Z}(H_1(P), \mathbb{Z}) = 0.$$
Note that if $k$ is a field (or more generally a self-injective ring), however, then the Ext functor vanishes and so you have the relation you want. But it's a rather special case. For a direct proof without the UCT see Alejo's answer.