The incident de la Boétie is referring to appears in Herodotus' (c. 484 – c. 425 BCE) Histories, of which various copies can be found online. Below is the relevant excerpt (from Volume 2, translated by G. C. Macaulay):
...Sperthias the son of Aneristos and Bulis the son of Nicolaos, Spartans of noble birth and in wealth attaining to the first rank, voluntarily submitted to pay the penalty to Xerxes for the heralds of Dareios which had perished at Sparta. Thus the Spartans sent these to the Medes [i.e. Persians - see note below] to be put to death.
And not only the courage then shown by these men is worthy of
admiration, but also the following sayings in addition: for as they
were on their way to Susa they came to Hydarnes (now Hydarnes was a
Persian by race and commander of those who dwelt on the sea coasts of
Asia), and he offered them hospitality and entertained them; and while
they were his guests he asked them as follows: "Lacedemonians, why is
it that ye flee from becoming friends to the king? for ye may see that
the king knows how to honour good men, when ye look at me and at my
fortunes. So also ye, Lacedemonians, if ye gave yourselves to the
king, since ye have the reputation with him already of being good men,
would have rule each one of you over Hellenic land by the gift of the
king." To this they made answer thus: "Hydarnes, thy counsel with
regard to us is not equally balanced, 117 for thou givest counsel
having made trial indeed of the one thing, but being without
experience of the other: thou knowest well what it is to be a slave,
but thou hast never yet made trial of freedom, whether it is pleasant
to the taste or no; for if thou shouldest make trial of it, thou
wouldest then counsel us to fight for it not with spears only but also
with axes."
Prior to this in Herodotus' text, he gives the Spartans' reasoning for sending Sperthias and Bulis. In short, it was because a series of unfavourable omens:
...in Sparta there is a temple of Talthybios, and there are also descendants of Talthybios called Talthybiads, to whom have been given as a right all the missions of heralds which go from Sparta; and after this event it was not possible for the Spartans when they sacrificed to obtain favourable omens. This was the case with them for a long time; and as the Lacedemonians were grieved and regarded it as a great misfortune, and general assemblies were repeatedly gathered together and proclamation made, asking if any one of the Lacedemonians was willing to die for Sparta...
NOTE: Herodotus used the term 'Medes' instead of 'Persians', which was not uncommon among Greeks in early 5th century BCE. As the Encyclopaedia Iranica notes, "The Persians generally are run together with the Medes, as can be recognized by Herodotus’s use of the terms mēdízein and mēdismós"