Suppose for simplicity that $M$ is connected and orientable. Choose a point $x\in M\setminus A$, and a closed disc $U$ centred at $x$. We can use the chart to deform $i$ into a homotopic map $j$ such that $j(A)\subseteq M\setminus\text{int}(U)$. Collapsing the complement of $U$ gives a map $p$ from $M$ to the one-point compactification $U\cup\{\infty\}$, which is homeomorphic to $S^n$. It is standard that the resulting map $p^*\colon\mathbb{Z}=\widetilde{H}^n(S^n)\to H^n(M)$ is an isomorphism, but $pj$ is constant, so the map $i^*p^*=j^*p^*=(pj)^*$ is zero, so $i^*$ is not an isomorphism.