With the rise of the #MeToo movement against sexual harassment, "the moment has come for the publication of this major and original work", Foucault's editor Frédéric Gros said.
His literary executors have agreed to its release by French publishers Gallimard, despite the author forbidding posthumous publication in his testament, drawn up two years before he died.
Foucault originally intended the History of Sexuality to be made up of six volumes but only published three during his lifetime.
The first introductory volume appeared in 1976 but the next two, The Use of Pleasure and The Care of the Self, did not come out until 1984.
Foucault died of an Aids-related illness the same year without finishing Confessions of the Flesh.
Christians, pagans and libido
In it he argues that the founders of the Christian church were no more sexually repressive than the pagans, many of whose attitudes they adopted to make the new religion more acceptable.
And he credits them with talking openly about procreation, adultery, chastity, homosexuality and masturbation and not treating sex as a taboo subject.
He examines the legacy of early Christians such as Saint Clement of Alexandria and Saint Augustine of Hippo, who admitted to praying “Lord, make me chaste – but not yet!” when a young man, but went on to formulate the doctrine of original sin.
Augustine introduced the concept of libido, according to Foucault, who interprets it as leading to a "subtle jurisdiction of sexual acts".
Power and knowledge
Foucault, who connected philosophy to psychology, history and social control, addressed the relationship between power and knowledge and was a huge influence on subsequent thought in France and the rest of the world.
Among his best-known works were Madness and Civilisation and The Order of Things.
As well as teaching in several French universities, he worked at the University of Tunis and the University of California at Berkeley.