In this paper, we numerically study the ground and first excited states of the fractional Schrödinger equation in an infinite potential well. Due to the nonlocality of the fractional Laplacian, it is challenging to find the eigenvalues and eigenfunctions of the fractional Schrödinger equation analytically. We first introduce a normalized fractional gradient flow and then discretize it by a quadrature rule method in space and the semi-implicit Euler method in time. Our numerical results suggest that the eigenfunctions of the fractional Schrödinger equation in an infinite potential well differ from those of the standard (non-fractional) Schrödinger equation. We find that the strong nonlocal interactions represented by the fractional Laplacian can lead to a large scattering of particles inside of the potential well. Compared to the ground states, the scattering of particles in the first excited states is larger. Furthermore, boundary layers emerge in the ground states and additionally inner layers exist in the first excited states of the fractional nonlinear Schrödinger equation. Our simulated eigenvalues are consistent with the lower and upper bound estimates in the literature.