I'd say that "at the end" merely locates something within time or space. Think of sentences like "You'll find the shop at the end of the street" or "At the end of the month they got married". Even when "at the end" is used on its own, I think it works in the same way, and the "of the street" or "of the month" is still implied: - What I like best about the film is the way that, at the end, the villain apologises and turns himself in to the police. (= at the end of the film)
"In the end" is more emotional and implies a struggle, a dilemma, an ordeal of some sort. You'll never say "in the end of X" because it's used on its own rather like "finally" or "eventually". - I tried to persuade them to come, but in the end they decided to stay home and have an early night. - England put up a brave fight, but in the end they just couldn't get the goal in the net.