In this paper, we consider the following discrete nonlinear Schrödinger equation \(\begin{aligned} \left\{ \begin{array}{l} -\Delta u_{n}+V_{n}u_{n}-\omega u_{n}=f_{n}(u_{n}), \quad n \in \mathbb {Z}, \\ \lim _{|n| \rightarrow \infty } u_{n}=0, \end{array}\right. \end{aligned}\) with non-periodic potentials. We obtain the existence of nontrivial solutions of this equation with various nonlinearities by using Morse theory. In this way, we need to compute the critical groups of the corresponding action functional of the equation. To the best of our knowledge, there is no result focusing on this issue in the literature.