According to the simple Peshat, these moshlim were Amorite poets that praised their king Sichon for his triumph over the Moabites. At the time the Torah was written down, this poem was well known to the scribes in the area and to the Israelites who lived there as well.
Moses (with divine inspiration) here wanted to preserve for the future generations to come the mighty deeds of Sichon, so they can get an idea of how powerful he was at the time, and to make it known that their (Israelites) triumph over the mighty Sichon was nothing short of miraculous. That's why he records part of this ancient poem, so that future generations see the might of his kingdom (after all even the advanced Moabites weren't able to fight him off, and it goes without saying that the unsophisticated Israelite's cannot conquer him) and that only with the help of god were they able to overcome him.
See Ibn Ezra Bamidbar 21:24 עד בני עמון for different explanation.