The gemara (Brachot 4a) describes King David's righteousness with this example:
כך אמר דוד לפני הקב"ה: רבונו של עולם, לא חסיד אני, שכל מלכי מזרח ומערב יושבים אגודות אגודות בכבודם, ואני ידי מלוכלכות בדם ובשפיר ובשליא כדי לטהר אשה לבעלה
I was thinking about that line, and I came to the conclusion that it was probably inspired by the interaction between David and Michal as he rejects her (Shmuel Bet 6:21-22):
ויאמר דוד אל מיכל: לפני יקוק אשר בחר בי מאביך ומכל ביתו, לצות אתי נגיד על עם יקוק על ישראל, ושחקתי לפני יקוק. ונקלתי עוד מזאת, והייתי שפל בעיני, ועם האמהות אשר אמרת, עמם אכבדה
Exactly what interaction between David and the "amhot" is he talking about that would be a cause for "kavod"? You might say in pshat that he's just going to associate with them somehow (and perhaps marry them, to the exclusion of Michal who he will no longer sleep with).
But I think the midrash wants to say something more specific. He will do some disgusting task ("hayiti shafal be'einai"), involving women ("im ha'amhot"), which nevertheless will be a reason for honor. Dealing with female bodily excretions in order to reunite husband and wife is a good example of such a task. In contrast to the other kings, whose honor consists of pompous social interactions ("yoshvim agudot agudot bichvodam"), David's honor would consist of this.
UPDATE: In addition to the details above, it was suggested to me (by RB) that the midrash may use examining blood as its example of a disgusting honorable act, specifically due to to David's past. In Shmuel Bet 16:7-12, Shimi ben Gera calls David a "man of blood" among other curses. David does not retaliate or even dispute this curse, and in fact says that God must have instructed Shimi to utter this curse. However, David wishes that God will notice his forbearance, and replace the curse with a blessing. This wish is phrased generically, but the midrash could understand it as David wishing that his martial bloodiness be replaced with some kind of peaceful and helpful bloodiness.