We study a class of semilinear Schrödinger equation with electromagnetic fields and the nonlinearity term involving critical growth. We assume that the potential of the equation includes a parameter λ and can be negative in some domain. Moreover, the potential behaves like potential well when the parameter λ is large. Using variational methods combining Nehari methods, we prove that the equation has a least energy solution which, as the parameter λ becomes large, localized near the bottom of the potential well. Our result is an extension of the corresponding result for the Schrödinger equation which involves critical growth but does not involve electromagnetic fields.