We model the anisotropy of the electrical conductivity of geomaterials based on the micro–macro homogenization theory. These materials are considered as random mixtures of solid grains and pores filled by fluids, both are supposed to have ellipsoidal shapes with their long axes oriented in horizontal direction. The electrical behavior of such material is transversely isotropic. The classical Eshelby's concept of a mixture of an ellipsoidal inclusion in an infinite homogeneous matrix, that was developed to study elastic properties of heterogeneous materials, is extended to analyze the conductivity of rocks. A combination of the self-consistent and the differential effective medium techniques allows developing a theoretical formula for the simulation of conductivity of anisotropic heterogeneous materials. For particular isotropic cases, this formula is similar to the classical well-known solutions that are largely used in practice such as Archie's law, Bruggman's theory and Bussian's equation. When applying to geomaterials, the developed theory provides the conductivities in both horizontal and vertical directions. The anisotropy, defined as the ratio between these two conductivities, is a function of the porosity, the shapes and the conductivities of each phase of rocks. This paper, focusing on a purely theoretical approach, shows how the micromechanical parameters affect the macroscopic anisotropy of electrical conductivity and resistivity of anisotropic materials.