Actually, he did teach this, but true to form, he did not use words to do so.
As others have often pointed out, there is no record that he literally said "preach the Gospel, use words if necessary" (good summary here). Or, to paraphrase a certain famous baseball player, "He never really said everything he said." But he did say it without words.
The following anecdote from a 13th century biography of the saint, written shortly after his death, is the most probable source of this legendary remark attributed to St. Francis.
Of the sermon Francis preached more by example than by words.
Repeatedly asked by his vicar to preach the word of God to his daughters [Poor Clare nuns] when he stopped off for a short time at St. Damian's, Francis was finally overcome by his insistence and consented. But when the nuns had come together, according to their custom, to hear the word of God, though no less also to see their father, Francis raised his eyes to heaven, where his heart always was, and began to pray to Christ.
He then commanded ashes to be brought to him and he made a circle with them around himself on the pavement, and sprinkled the rest of them on his head. But when they waited for him to begin, and the blessed father remained standing in the circle in silence, no small astonishment arose in their hearts.
The saint then suddenly rose and to the amazement of the nuns, in place of a sermon he recited the Miserere mei Deus [Psalm 50 (51) “Have mercy on me, O God, according to thy great mercy. And according to the multitude of they tender mercies blot out my iniquity. . . ”]. When he had finished, he quickly left.
The Servants of God were so filled with contrition because of the power of this symbolic sermon that their tears flowed in abundance and they could scarcely restrain their hands from inflicting punishment on themselves. By his actions he taught them that they should regard themselves as ashes and that there was nothing in his heart concerning them but what befit this consideration.
This was the way he acted toward these holy women; his visits to them were very useful, but they were forced upon him and rare. And this was his will for all his brothers: he wanted them to serve these women in such a way for Christ, whom they serve, that like them that have wings they would always guard against the snare laid out for them.
Celano, Second Life, Chapter CLVII, no. 207.