One autumn, the rivers flooded, leaving a vast expanse of water everywhere. Seeing this, the god of the rivers was filled with pride at his vast domain. He then journeyed to the Northern Sea. When he saw the mighty ocean stretching to the horizon, he realized how puny he actually was, and sighed with disappointment.
This idiom originally meant feeling one's own insignificance upon seeing another's might. Now it is mostly used to indicate being able to do nothing but sigh in the face of a huge task.