Vayikra27:28

אַךְ־כָּל־חֵרֶם אֲשֶׁר יַחֲרִם אִישׁ לַיהוָה מִכָּל־אֲשֶׁר־לוֹ מֵאָדָם וּבְהֵמָה וּמִשְּׂדֵה אֲחֻזָּתוֹ לֹא יִמָּכֵר וְלֹא יִגָּאֵל כָּל־חֵרֶם קֹדֶשׁ־קָדָשִׁים הוּא לַיהוָה׃

But anything that a man sets apart by a ban for the Eternal, of all that he has, of man or beast or of the field of his holding, shall not be sold or redeemed: everything set apart by a ban is most holy to the Eternal.

Vayikra 27:28

אַךְ־כָּל־חֵרֶם אֲשֶׁר יַחֲרִם

Vayikra / Leviticus 27:28 · Drash

Vayikra 27:28

אַךְ־כָּל־חֵרֶם אֲשֶׁר יַחֲרִם אִישׁ לַיהוָה מִכָּל־אֲשֶׁר־לוֹ מֵאָדָם וּבְהֵמָה וּמִשְּׂדֵה אֲחֻזָּתוֹ לֹא יִמָּכֵר וְלֹא יִגָּאֵל כָּל־חֵרֶם קֹדֶשׁ־קָדָשִׁים הוּא לַיהוָה׃

But anything that a man sets apart by a ban for the Eternal, of all that he has, of man or beast or of the field of his holding, shall not be sold or redeemed: everything set apart by a ban is most holy to the Eternal.

Drash דְּרָשׁ

No more than a fifth

Generosity is a virtue. But can generosity go so far that it becomes a mistake?

Lekach Tov: "of all that he has," not all that he has: one who gives away his property should give away no more than a fifth. "Of man" is a Canaanite slave, not a Hebrew slave, whose body is not bought. Rabbi Elazar ben Azaryah: if even for the sanctuary one may not ban all one's property, all the more so a person should take care of his property. And all substitute words for "ban" (חֵרֶם) take effect like the word itself.

How Midrash Lekach Tov explain it

Midrash Lekach Tov But anything that a man sets apart by a ban for the Eternal, of all that he has

The verse: "But anything that a man sets apart by a ban for the Eternal, of all that he has," and not all that he has. And so they said: one who gives away his property should not give away more than a fifth. "Of man," and not every man: this teaches that a man consecrates his Canaanite slave and maidservant but not his Hebrew slave and maidservant, for their body is not bought. "Or beast," and not every beast. "Or of the field," and not every field. Perhaps if a man banned all of them, they will be banned? Therefore it says "but" (אַךְ), to exclude. These are the words of Rabbi Eliezer. Rabbi Elazar ben Azaryah said: if even for the sanctuary a man may not ban all his property, all the more so a man should take care of his property.

"Shall not be sold": by the treasurer. "Or redeemed": by the owners. "Everything set apart by a ban is most holy to the Eternal." Rabbi Yehudah ben Beteira said: from here we see that a ban without detail goes to the upkeep of the Temple, but if he stated "for the kohen," it belongs to the kohen. Rabbi Shimon says: kohanim do not make bans, for the bans are theirs, while Levites make bans, for the bans are not theirs. It is taught there, in tractate Nedarim: all substitutes for "ban" are like a ban: cherek (חֶרֶק), cherech (חֶרֶךְ), cheref (חֶרֶף) are substitutes for "ban" (חֵרֶם).

Takeaway

"All the more so" (קַל וָחֹמֶר) is a conclusion from the lenient to the strict: if one may not give everything even to the Temple, all the more so one may not squander everything on something else.
The rule "give away no more than a fifth" was enacted by the sages at Usha (Ketubot 50a): one who gives away everything may himself become poor and dependent on others.
Substitute words (כִּנּוּיִים) are altered forms people used in everyday speech. The Mishnah counts them as a vow, like the word itself (Mishnah Nedarim 1:2).