Myxozoans are parasitic, microscopic cnidarians that have retained the phylum-characteristic stinging capsules called nematocysts. Free-living cnidarians, like jellyfish and corals, utilize nematocysts for feeding and defence, with discharge powered by osmotic energy. Myxozoans use nematocysts to anchor to their fish hosts in the first step of infection, however, the discharge mechanism is poorly understood. We used Myxobolus cerebralis, a pathogenic myxozoan parasite of salmonid fishes, and developed two assays to explore the nature of its nematocyst discharge. Using parasite actinospores, the infectious stage to fish, we stimulated discharge of the nematocysts with rainbow trout mucus in vitro, in solutions enriched with chloride salts of Na+, K+, Ca2+ and Gd3+, and quantified discharge using microscopy. We then used quantitative polymerase chain reaction to evaluate the in vivo effects of these treatments, plus Mg2+ and the common aquaculture disinfectant KMnO₄, on the ability of M. cerebralis actinospores to infect fish. We found that Mg2+ and Gd3+ reduced infection in vivo, whereas Na+ and K+ over-stimulated nematocyst discharge in vitro and reduced infection in vivo. These findings align with nematocyst discharge behaviour in free-living Cnidaria, and suggest phylum-wide commonalties, which could be exploited to develop novel approaches for controlling myxozoan diseases in aquaculture.