We present and discuss a new family of topological hairy dyonic black hole solutions in asymptotically anti--de Sitter space. The coupled Einstein-Maxwell-scalar gravity system, that carries both the electric and magnetic charges is solved, and exact hairy dyonic black hole solutions are obtained analytically. The scalar field profiles that give rise to such black hole solutions are regular everywhere. The hairy solutions are obtained for planar, spherical, and hyperbolic horizon topologies. In addition, analytic expressions of regularized action, stress tensor, conserved charges, and free energies are obtained. We further comment on different prescriptions for computing the black hole mass with hairy backgrounds. We analyze the thermodynamics of these hairy dyonic black holes in canonical and grand canonical ensembles, and we find that both electric and magnetic charges have a constructive effect on the stability of the hairy solution. For the case of planar and hyperbolic horizons, we find thermodynamically stable hairy black holes that are favored at low temperatures compared to the nonhairy counterparts. We further find that, for a spherical hairy dyonic black hole, the thermodynamic phase diagram resembles to that of a Van der Waals fluid not only in canonical but also in the grand canonical ensemble.