Mishneh Torah — Negative Mitzvot מצוות לא תעשה, Chapter 286
The full Hebrew text of Mishneh Torah, Negative Mitzvot, Chapter 286, with English translation by Maimonides (Rambam).
שלא יעיד בעל עבירה, שנאמר "אַל תָּשֶׁת יָדְךָ עִם רָשָׁע לִהְיוֹת עֵד חָמָס" (שמות כג, א).
For a sinner not to act as a witness, as [Exodus 23:1] states: "Do not conspire with a wicked person to be a corrupt witness."