The first line is from
Isa. 62:11, the rest from
Zech. 9:9. John (12:14f.) makes it clear that Jesus did not quote the passage himself. In Matthew it is not so plain, but probably it is his own comment about the incident.
It is not Christ’s intention to fulfill the prophecy, simply that his conduct did fulfill it.
Robertson, A. (1997). Word Pictures in the New Testament (Mt 21:4). Oak Harbor: Logos Research Systems.