As I understand you want to understand meaning of the idiom mentioned in the question.
Virtue is its own reward means if you are doing something good meaning you are virtuous, you won't long for any reward for this deed, this nature of doing good for others itself is a reward.