In this work, a new asymptotic preserving (AP) scheme is proposed for the anisotropic elliptic equations. Different from previous AP schemes, the actual one is based on first-order system least-squares for second-order partial differential equations, and it is uniformly well-posed with respect to anisotropic strength. The numerical computation is realized by a deep neural network (DNN), where least-squares functionals are employed as loss functions to determine parameters of DNN. Numerical results show that the current AP scheme is easy for implementation and is robust to approximate solutions or to identify the anisotropic parameter in various 2D and 3D tests.