Jeremiah9:22

כֹּה אָמַר יְהוָה אַל־יִתְהַלֵּל חָכָם בְּחָכְמָתוֹ וְאַל־יִתְהַלֵּל הַגִּבּוֹר בִּגְבוּרָתוֹ אַל־יִתְהַלֵּל עָשִׁיר בְּעָשְׁרוֹ׃

Thus said the Eternal: "Let not the wise man boast of his wisdom, and let not the mighty man boast of his might, let not the rich man boast of his riches.

Jeremiah 9:22

כֹּה אָמַר יְהוָה

Yirmeyahu / Jeremiah 9:22 · Sod

Jeremiah 9:22

כֹּה אָמַר יְהוָה אַל־יִתְהַלֵּל חָכָם בְּחָכְמָתוֹ וְאַל־יִתְהַלֵּל הַגִּבּוֹר בִּגְבוּרָתוֹ אַל־יִתְהַלֵּל עָשִׁיר בְּעָשְׁרוֹ׃

Thus said the Eternal: "Let not the wise man boast of his wisdom, and let not the mighty man boast of his might, let not the rich man boast of his riches.

Sod סוֹד

Strength that is given

When something works out, you want to say "I did it myself". But sometimes it is more honest to say: I was given the strength, and I know what for.

Mei HaShiloach: the verse speaks not of things of this world but of the wisdom of the Torah, the strength to conquer the evil inclination, and happiness with one's lot. Yet even of these a person must not boast or take the strength for himself. He must understand that the Most High gave him this strength, and only for His service: that is what "understands and knows Me" means.

How Mei HaShiloach explain it

Mei HaShiloach Let not the wise boast of his wisdom, and let not the mighty boast of his might, let not the rich boast of his wealth

As my grandfather, the holy rav of blessed memory, explained, this verse does not speak of things of this world. "Who is mighty? One who conquers his evil inclination", and "who is rich? One who is happy with his lot", that is, his soul is at ease in it. And the wise is one in whose heart the light of the Torah shines. Yet a person should not boast of this and take some strength for himself from it, God forbid. Only as the verse ends: "But let him who boasts boast in this: that he understands and knows Me". That is, the mighty one who conquers his evil inclination should understand well that this strength to overcome all obstacles the Most High gave him only for His service, blessed is He. And the one happy with his lot should understand well that the Most High lights up this strength for him. And the wise in the light of his Torah should understand well that it is not from himself at all, but the Most High grants it to him each time for His service, blessed is He (Tiferet Yosef, Chagigah).

Takeaway

Mei HaShiloach is the book of Rabbi Mordechai Yosef Leiner of Izhbitza. This passage was gathered into the anthology from the book of his descendants, "Tiferet Yosef", which is why it says "my grandfather".
The teaching "Who is mighty? One who conquers his evil inclination" and "Who is rich? One who is happy with his lot" is from Pirkei Avot (4:1). Mei HaShiloach reads Yirmeyahu's (Jeremiah's) verse through these words.
The end of the verse in Mei HaShiloach is the next verse of the haftarah: "But let him who boasts boast in this: that he understands and knows Me" (Yirmeyahu / Jeremiah 9:23). The haftarah is the passage from the Prophets read in the synagogue after the Torah portion.