Just as food can be either kosher or unkosher, so too can money be either kosher or unkosher.
Although kosher money is not yet holy, one may benefit from it, and thus one may also perform a mitzvah with it.
On the other hand, one may not gain benefit from stolen, unkosher money; one cannot perform a mitzvah with stolen funds and raise them to holiness.
In this sense, the halakhic determination as to whether something is forbidden or permissible is a statement about its character, about whether or not it can be rectified and elevated to holiness.
–Rabbi Adin Steinsaltz