They could both be correct, but they mean different things.
"End of the history" is only used when you're talking about the end of the history of something specific e.g. "The fall of Constantinople marked the end of the history of the Roman Empire".
"End of history" would mean an end to the general concept of history. The beginning of history is usually defined as when humans first invented writing, or when agriculture was invented and the first cities were formed i.e. when humans no longer lived in a hunter-gatherer society. I suppose the end of history would either be the extinction of humanity, or at least huge regression in technology to the point where people can no longer read and write, and live natively off the land.