It is an unusual piece of text, as it is written in the style of a theatrical dialogue, rather than a record of opposing speeches as Thucydides usually wrote. The historical background of this portion of the History is the invasion of the island of Melos by Athens in 416 BC during the Peloponnesian War. The Melians had always resisted the influence of the Delian League, and resisted this invasion as well. Thucydides writes that both sides held a meeting where they presented their arguments for and against the invasion. In the end, the Athenians were victorious and enslaved the men of Melos.
The dialogue as written in the History probably reflects Thucydides personal view of the invasion of Melos, rather than accurately recording the specific speeches delivered at the meeting.