Harrison, 81, was awarded the STG50,000 ($A97,079) prize at a ceremony in London for a book the judges said combines "huge ambition" and "extraordinary, expert writing."
Harrison beat five other finalists including previous winners Douglas Stuart and Marlon James and Pulitzer Prize laureate Elizabeth Strout.
The End of Everything is set on England's Channel coast in the near future, after an unspecified calamity has shattered society and brought an influx of enigmatic alien entities to Britain. It centres on a beachcomber who lives with his gun-toting aunt and discovers a puzzling, shapeshifting artefact on the shore.
Historian Mary Beard, who chaired the judging panel, said the book is "the politics of now seen through the lens of the future," and about a society "undergoing a catastrophe that they don't really understand."
"What he does is to say, when the catastrophe comes, you won't know what's happening," Beard said.
"And there are bits where you, the reader, are with the characters in not fully understanding. Now, I think that's fantastically exciting."
Harrison's work includes large dollops of fantasy and speculative fiction, and he won the Arthur C. Clarke science fiction award for a previous novel, Nova Swing. Although borders between publishing genres are increasingly blurred, it's still rare for a work of sci-fi to win a major literary prize.
Harrison said before he won that he had been "working for 40 to 50 years to shift the balance, both as a novelist and as a critic. Why shouldn't a well-written (work of science fiction) be considered to be literary fiction?"
Booker Prize Foundation chief executive Gaby Wood noted the prize has removed references to "literary fiction" from its materials, because "all fiction is literary."
Beard said Harrison's win was "recognition of what some people would see as the blindingly obvious, that you find great books in every genre."
Founded in 1969, the Booker Prize is open to English-language novels from any country published in the UK and Ireland and has a reputation for transforming writers' careers.
Its winners have included Salman Rushdie, Ian McEwan and Arundhati Roy.
At 81, Harrison is two years older than Margaret Atwood when she won in 2019. The End of Everything is his 13th novel.
Beard said the prize was definitely "not a lifetime achievement award."
"We thought this was a book that had earned it," she said.