In the Bible, mammon is not a demon but simply an Aramaic word meaning “wealth” or “property.” Matthew states:
No one can serve two masters. He will either hate one and love the other, or be devoted to one and despise the other. You cannot serve God and mammon. Matthew 6:24
In Paradise Lost
Milton wrote:
Mammon led them on–
Mammon, the least erected Spirit that fell
From Heaven; for even in Heaven his looks and thoughts
Were always downward bent, admiring more
The riches of heaven’s pavement, trodden gold,
Than aught divine or holy else enjoyed
In vision beatific. By him first
Men also, and by his suggestion taught,
Ransacked the centre, and with impious hands
Rifled the bowels of their mother Earth
For treasures better hid. Soon had his crew
Opened into the hill a spacious wound,
And digged out ribs of gold…
– Paradise Lost, Book i, 678-690
Milton then continued by attributing a rather lengthy speech on motivations for a rebellion against heaven in Book ii, 228-290
Mammon is the demon of avarice. Milton says he taught men to rend the breast of the earth to wrest away her treasures.