Riboswitches are RNA sensors that regulate gene expression upon binding specific metabolites or ions. Bacterial riboswitches control gene expression primarily by promoting intrinsic transcription termination or by inhibiting translation initiation. We now report a third general mechanism of riboswitch action: governing the ability of the RNA-dependent helicase Rho to terminate transcription. We establish that Rho promotes transcription termination in the Mg(2+)-sensing mgtA riboswitch from Salmonella enterica serovar Typhimurium and the flavin mononucleotide-sensing ribB riboswitch from Escherichia coli when the corresponding riboswitch ligands are present. The Rho-specific inhibitor bicyclomycin enabled transcription of the coding regions at these two loci in bacteria experiencing repressing concentrations of the riboswitch ligands in vivo. A mutation in the mgtA leader that favors the "high Mg(2+)" conformation of the riboswitch promoted Rho-dependent transcription termination in vivo and in vitro and enhanced the ability of the RNA to stimulate Rho's ATPase activity in vitro. These effects were overcome by mutations in a C-rich region of the mRNA that is alternately folded at high and low Mg(2+), suggesting a role for this region in regulating the activity of Rho. Our results reveal a potentially widespread mode of gene regulation whereby riboswitches dictate whether a protein effector can interact with the transcription machinery to prematurely terminate transcription.