John A. Boehner, the speaker of the House from 2011 to 2015, reversed a long-held stance against marijuana legalization on Wednesday, saying on Twitter that “my thinking on cannabis has evolved.”

Mr. Boehner, a Republican leader who in 2011 told a constituent he was “unalterably opposed” to legalization, joined the board of advisers of Acreage Holdings, a cannabis corporation that operates in 11 states.

While the announcement might be viewed as a sign that cannabis is becoming a big business that can afford to ally with prominent names from the world of politics, Mr. Boehner cast it as a genuine change of heart.

In a statement, he and William F. Weld, the former Massachusetts governor, who also joined the Acreage Holdings board, said “the time has come for serious consideration of a shift in federal marijuana policy.”