In this work, we review the formalism which would allow us to model magnetically deformed neutron stars. We study the e ect of di erent magnetic eld con gurations on the equation of state (EoS) and the structure of such stars. For this aim, the EoS of magnetars is acquired by using the lowest order constraint varia-tional (LOCV) method and employing the AV18 potential. We show how the magnetic eld varies from the surface to the center of neutron star by using various exponential and polynomial pro les and compare their results. In addition, global properties of neutron stars are obtained within two formalisms. The rst formalism is described by considering the pressure into two directions and the deformation of neutron stars is governed by anisotropies in the equation of state. The second formalism for in-vestigating macroscopic properties of magnetars is gained by treating the nonuniform pressure as a perturbation to the total pressure and expanding metric and pressure up to the quadrupole term in spherical harmonics. Afterwards, we include three nucleon interactions (TNI) to the EoS and apply this model to represent our results for both exponential and polynomial magnetic eld pro les. The maximum gravitational mass is obtained in the range of (1. 71-1. 80) M and (2. 13-2. 19) M for the EoS without and with TNI contribution, respectively.