Desperation is a hopeless state. If you learned that your friend had sold her beloved shoe collection, you'd know she did it out of desperation.
When you've lost hope or have run out of possible solutions to a problem, you're experiencing desperation. The word implies a reckless kind of frustration. For example, a person who hasn't eaten in three days might steal food out of desperation. The origin of the word traces back to the Latin desperare, "to lose all hope," which is formed from the prefix de-, "without," added to sperare, "hope."