To me, "at the end" is literal while "in the end" is figuative - at least, by comparison. "At the end" would be used to talk about some thing which actually has an end: the end of the road/journey/story/rope. There may be figurative expressions using "at" but they're usually based on something with a real end: "at the end of the day" = "in the final analysis."