This is a haunting poem from the 15th century, a time when the 'Dance of Death' and other memento mori themes were becoming increasingly popular. I almost feel I should apologise for its gruesome nature, but as poetry, it's incredibly effective, mostly because of the rhyme scheme (a single rhyme per stanza) and the obsessive repetition of 'earth', which gives it a kind of spooky incantational sound.
There are multiple versions of this poem, variations on a theme usually keeping to the same distinctive rhyme scheme (which gives you a clue as to how central the rhyme is to the overall effect). Fascinatingly, the last three stanzas appear in a medieval wall-painting in the Guild Chapel in Stratford-upon-Avon; and given that context, it's hard not to think of Hamlet:
Alexander died, Alexander was buried, Alexander returneth into dust; the dust is earth; of earth we make loam; and why of that loam, whereto he was converted, might they not stop a beer-barrel?
Imperious Caesar, dead and turn'd to clay,
Might stop a hole to keep the wind away:
O, that that earth, which kept the world in awe,
Should patch a wall to expel the winter flaw!
Here's the medieval poem, with a modernised version below (of the many available versions, this is the text of Lincoln, Lincoln Cathedral Library MS. 91). Essentially, to read it you have to understand every first earth as 'man (who is dust)' and every second earth as either 'earth' (as in, 'the world') or 'dust', in the sense of physical matter; but the point of the poem is that they are the same thing.
Memento, homo, quod sinis es
Et in cenerem reverteris.
Erthe oute of erthe is wondirly wroghte,
Erthe has geten one erthe a dignite of noghte,
Erthe appon erthe hase sett alle his thoghte
How that erthe upon erthe may be heghe broghte.
Erthe upon erthe wolde be a kinge
Bot how erthe to erthe sall, thinkes he no thinge
When erthe bredes erthe and his rentes home bringe
Thane shall erthe of erthe have full harde parting.
Erthe upon erthe winnes castells and towrres
Thane sayse erthe unto erthe, "This es al ourres"
When erthe upon erthe has bigged up his bourres
Thane shall erthe for erthe suffere sharpe scourres.
Erthe gos upon erthe as molde upon molde
He that gose upon erthe, gleterande as golde,
Like as erthe never more go to erthe scholde
And yitt schall erthe unto erthe ga rathere than he wolde
Now why that erthe luffes erthe, wondere me thinke
Or why erthe for erthe sholde other swete or swinke
For when erthe appon erthe has broughte within brinke
Thane shall erthe of erthe have a foul stinke.
Mors solvit omnia.
Remember, man, that you are dust
And to dust you shall return.
Earth out of earth is wondrously wrought,
Earth has on earth a dignity of naught,
Earth upon earth has set all his thought
How that earth upon earth may be high brought.
Earth upon earth would be a king
But how earth to earth shall [come], thinks he not a thing;
When earth breeds earth and his rents home bring
Then shall earth of earth have full hard parting.
Earth upon earth wins castles and towers
Then says earth unto earth, "This is all ours!"
When earth upon earth has built up his bowers
Then shall earth for earth suffer sharp showers. [attacks]
Earth goes upon earth as mould upon mould
He goes upon earth, glittering like gold,
As if earth never more return to earth should;
And yet shall earth unto earth go faster than he would.
Now why that earth loves earth, wonder me think [it is a wonder to me]
Or why earth for earth should either sweat or swink [labour]
For when earth upon earth is brought within brink [within bounds, i.e. in the grave]
Then shall earth of earth have a foul stink.
Death dissolves all things.
A four-line version of this poem, in BL Harley 2253, f.59v