From Sahih Bukhari (Hadith 5031):
Narrated Ibn `Umar:Allah's Messenger (ﷺ) said, "The example of the person who knows the Qur'an by heart is like the owner of tied camels. If he keeps them tied, he will control them, but if he releases them, they will run away
Reference: Bukhari 5031