This phrase is often used to exaggerate the actual cost of something for effect. He spent a king's ransom on his wedding, or so he claims.
Pro Tip 2/3
Literary Origin
Originates from historical ransoms for royalty; conveys a sense of extravagance and rarity. The necklace must be worth a king's ransom, it's so exquisite.
Pro Tip 3/3
Informal Context
Used in casual conversation, not in formal writing or official financial discussions. My friend joked that his new phone cost him a king's ransom.