Credited to Henry David Thoreau, the full quote is:
The mass of men lead lives of quiet desperation.
I’ve seen this attributed to a couple of his writings, including Civil Disobedience. The correct source for the quote is from his classic Walden, and it is found in the first chapter entitled Economy.
Here are some additional sentences from that paragraph, which starts with the quote:
The mass of men lead lives of quiet desperation. What is called resignation is confirmed desperation. From the desperate city you go into the desperate country, and have to console yourself with the bravery of minks and muskrats. A stereotyped but unconscious despair is concealed even under what are called the games and amusements of mankind. There is no play in them, for this comes after work.
The book itself can be found at Amazon (as I write this, several Kindle editions are free). Read more about Thoreau at Wikipedia.