Within Gauss–Bonnet gravity, we construct a solution endowed with dyonic matter fields in a higher dimension. The quasi-topological electromagnetism generates two kinds of contributions; one is the kinetic terms, and the second refers to the interactif terms. This overcomes the invariance topological problem. We investigate the thermodynamical proprieties of the obtained solution, namely, ADM mass, Hawking temperature, and entropy. To inspect the local stability, we examine the associated heat capacity. With regards to optical proprieties, we analyze the null geodesic in terms of the given parameter space. The shadow radius is a generating form with all the physical parameters that govern the shadow behavior. The study restricts only the taking of the effects of the D and $$\alpha $$
α
parameters. Finally, we examine the impact of the dimension D, GB coupling constant $$\alpha $$
α
, the cosmological constant $$\Lambda $$
Λ
, the electric $$q_e$$
q
e
, the magnetic charge $$q_m$$
q
m
and the coupling constant $$\beta $$
β
on the energy emission rate.