The short answer
The exact sentence does not appear in Gandhi's collected writings or recorded speeches. It is a modern compression of something he did express — shortened, smoothed, and sharpened into a slogan that fits on a poster.
What Gandhi actually wrote
The closest verified passage runs along these lines: if we could change ourselves, the tendencies in the world would also change; as a person changes their own nature, so does the attitude of the world change toward them. Note what the original contains that the slogan loses. Gandhi is describing a mechanism — an argument about how inner change alters the world's response — not issuing a command. The famous version keeps the moral and throws away the reasoning.
How a paraphrase becomes a quotation
This is the most common route to misattribution, and it is worth understanding because it is so innocent. Someone summarises a thinker accurately. The summary is catchier than the original. It gets repeated, then printed, then set in quotation marks, and at that point a paraphrase has been promoted to a transcript. The same thing happened to Voltaire, whose most famous line was written by his biographer Evelyn Beatrice Hall in 1906 as a description of his attitude, not a record of his speech.
Does the misquote misrepresent him?
Less than most. The sentiment is genuinely Gandhian, which is exactly why it stuck and why so few people question it. But the flattening has a cost: the slogan is an instruction you can print and ignore, while the original is a claim about cause and effect that you have to think about. The polished version is more shareable and less useful.
What this means for your English
Compare the two versions aloud and you will hear one of English's most useful contrasts: the imperative (“be the change”) versus the conditional (“if we could change ourselves…”). Imperatives are punchy and memorable; conditionals are precise and thoughtful. Fluent writers move deliberately between them — and knowing why the slogan won tells you a great deal about how English persuades.