We describe homomorphisms ϕ : H → G for which G is acylindrically hyperbolic and H is a topological group which is either completely metrizable or locally countably compact Hausdorff. It is shown that, in a certain sense, either the image of ϕ is small or ϕ is almost continuous. We also describe homomorphisms from the Hawaiian earring group to G as above. We prove a more precise result for homomorphisms ϕ : H → Mod( ), where H is as above and Mod( ) is the mapping class group of a connected compact surface . In this case there exists an open normal subgroup V ≤ H such that ϕ(V ) is finite. We also prove the analogous statement for homomorphisms ϕ : H → Out(G), where G is a one-ended hyperbolic group. Some automatic continuity results for relatively hyperbolic groups and fundamental groups of graphs of groups are also deduced. As a by-product, we prove that the Hawaiian earring group is acylindrically hyperbolic, but does not admit any universal acylindrical action on a hyperbolic space.