Twitter Inc. is banning political advertising, taking the opposite position of rival Facebook Inc. on an issue that is riling campaigns and prompting social-media companies to rethink how to deal with the spread of potentially false and misleading information on their platforms.

The decision, announced in a series of tweets Wednesday from Twitter Chief Executive Jack Dorsey, reverberated to political campaign staffers, digital media buyers and even President Trump. The timing of Mr. Dorsey’s announcement—minutes before Facebook posted its quarterly results—highlighted the two companies’ diverging positions on what has become a thorny topic for the industry.

Facebook has been roiled in recent weeks by lawmakers and its employees calling for changes in how the world’s largest social network company handles political advertising.

Twitter’s policy will be enforced world-wide starting Nov. 22, Mr. Dorsey said. Twitter also said it will allow some exceptions, such as ads in support of voter registration.

“Paying to increase the reach of political speech has significant ramifications that today’s democratic infrastructure may not be prepared to handle,” Mr. Dorsey said in a tweet from his personal account. “It’s worth stepping back in order to address.”