Hebrew parallels - one part set equal to another- restate one thing in different language and becomes a metaphor in God's prophetic language. In Isa. 13:5 "from a land afar off" is immediately phrased again as "from the end of the heavens".
The land afar off was equated with the end of the heavens.
We have to find out which people and which king the prophet was speaking to, and this case the king was that of Babylon. The warning was of the destruction of Babylon. In prophetic language of coming judgment of a land or nation, the "heavens" were the kingdom of that nation.
The king held dominion over the lands and region of his kingdom. Kings rule at the will of God (Dan. 2:21) and He judges the nations in their days of calamities or days of vengeance (Deu. 32:35; Jer. 18:17; 49:32, etc.). He shakes the "earth" or nations out of their places --
"Therefore the heavens I cause to tremble, And the earth doth shake from its place, In the wrath of Jehovah of Hosts, And in a day of the heat of his anger." (Isa. 13:13, YLT)
The heavens that tremble at His judgment are the kingdoms of men.
So, in verse 5 the “end of heavens” referred to the end of the kingdom of Babylon, to the borders of Babylon. The prophet told them that God was going to send a host against Babylon, from the kingdoms of nations to destroy Babylon. The end of heavens was the border of the kingdom of Babylon, because that was as far as the rule and authority of that king extended.
The nations that came against Babylon came from outside the borders of Babylon, from the end of the rule and dominion of that king.
"2 Hear, O heavens, and give ear, O earth, For Jehovah hath spoken: Sons I have nourished and brought up, And they — they transgressed against Me.” (Isa. 13:2, YLT)
Isaiah was not calling God to listen to him. He was calling two groups of people in Babylon: the king and ruling authorities, and the people of the land. The kings held dominion over their territory on earth, and are types of the heaven above where God holds dominion over all the earth. The kings hold dominion over the people in their earthly kingdoms.
The heaven where God sits on His throne is not shaken. So when we see prophetic judgment language speak of heavens being shaken, it is referring to the shaking of the nations, the removal of the kings power, and upset in political authority.
Similarly with the use of "earth". In Jer. 16:19,
"“ O Jehovah, my strength, and my fortress, And my refuge in a day of adversity, Unto Thee nations do come from the ends of earth, And say, Only falsehood did our fathers inherit, Vanity, and none among them is profitable.” (KJV)
The “ends of the earth” only had meaning for the borders of the land that was under judgment. The ends of the earth in Jer. 16:19 were the borders of Judea and Jerusalem.
We have to be careful to identify which nation and which people the prophet was sent to warn in order to know which nation's "heavens" and "earth" - authority and regional land - would be affected by that prophesy.
See more at my blog post "Revelation: The Four Corners of The Earth" at ShreddingTheVeil