Brihadaranyaka Upanishad 4.4.5-6
Now as a man is like this or like that, according as he acts and according as he behaves, so will he be: a man of good acts will become good, a man of bad acts, bad. He becomes pure by pure deeds, bad by bad deeds. And here they say that a person consists of desires. And as is his desire, so is his will; and as is his will, so is his deed; and whatever deed he does, that he will reap. And here there is this verse: "To whatever object a man's own mind is attached, to that he goes strenuously together with his deed; and having obtained the end (the last results) of whatever deed he does here on earth, he returns again from that world (which is the temporary reward of his deed) to this world of action. So much for the man who desires."