to end up; in the end; finally; after all
Ends up happening after a long process or effort, often with a negative outcome.
あげく expresses that after a long period of doing something or after much effort, a final result occurs. It often carries a sense of frustration or disappointment, but can be neutral. It is usually used with past tense verbs, indicating that the process is completed. For example, 迷ったあげく means 'after hesitating, in the end'. This pattern is common in written Japanese and formal speech, but less so in casual conversation. In casual talk, you might hear 結局 instead. Note that the result is often negative or undesirable, but not always.