We have used a self-consistent magnetohydrodynamics model to study the evolution of solar magnetic fields in an active region. The problem has been cast as an initial boundary-value problem based on explicit mathematical formalism (i.e., method of projected characteristics), whereby a variety of horizontal photospheric motions can be treated. In this paper we deal specifically with photospheric shear motions in the active region. Our results show the evolution of the magnetic energy, the electric current systems, including the distributions of J⊥ (current perpendicular to the magnetic field) J| (current parallel to the magnetic field), the magnetic field configuration and a comparison between the build-up of magnetic energy in a pre-twisted field and in an initial untwisted field due to photospheric shearing motions. From these results we conclude that the energy build-up is confined within a certain region near the neutral line at the photospheric level. The possible location of the particle acceleration also can be studied.