• You use at the end when talking about the last part of a story, book, film, game etc:

At the end, the hero dies.
There is a summary at the end of the chapter.
• You often use at the end of when talking about the last part of a period of time:

Marco Polo travelled through Asia at the end of the 13th century.
Don’t say: in the end of the 13th century

• In the end means the same as ‘eventually’. You use it when saying that something happens or after a long period of time or a lot of other things have happened:

In the end, she got her money back.I’m sure we’ll win in the end.