The final days of King Jehoiakim are marked by complete disgrace and the denial of the most basic dignity given to the dead. The commentators agree that the concept of a donkey's burial does not refer to an actual burial process at all. Instead, it highlights the exact opposite: a total absence of burial. Just as a donkey that dies on the road is simply abandoned where it falls or discarded into the trash, the king is destined to be removed and forsaken.
The physical treatment of his body further emphasizes this deep shame. His corpse is to be dragged roughly along the ground and thrown away, entirely deprived of a proper resting place. This disgraceful event occurs far away from the gates of Jerusalem, physically removing him from the city.
Historically, this harsh reality came to pass when Nebuchadnezzar and the Chaldeans arrived to take revenge against Jehoiakim for his rebellion. As he was being led away into exile, the king died on the road outside of Jerusalem. His guards refused to allow him any form of burial, choosing instead to simply discard his remains [רד״ק, מצודת דוד, ביאור שטיינזלץ].