In the Spring and Autumn Period, Duke Ping of Chu was misled by slanderers and had Wu Zixu's father executed. Wu Zixu fled to the State of Wu. More than ten years later, he took his revenge by helping Wu conquer Chu. Yet he suffered agonies of remorse because his countrymen called him a traitor. He protested, "I'm just like a traveler. It's already late, but I still have a long way to go. I simply don't know what to do."
This idiom originates from the above story. It describes being in a very difficult situation at the end of one's tether.