Tā zuò le gāi zuò de shì, wènxīn-wúkuì de líkāi le.
He did what he had to do and left with a clear conscience.
Tips
memory
问心无愧 literally means: ask (问) your heart (心), no (无) shame (愧). The image is of interrogating your own conscience and finding nothing to be ashamed of - an internal moral audit with a clean result.