Can behavior affect our DNA

Our behavior obviously determines whether our genetic code is passed on, as @DPRK notes. Our behavior can also affect the DNA mutation rate in germline cells through exposure to mutagens, but this is only the rate at which functionally random changes occur.

In response to the environment (i.e. including our behavioral interaction with the environment), the genome in many cells is constantly modified without changing the DNA base sequence to modulate what information is read out and in what quantity. These are called epigenetic modifications, and these are highly significant as a key part of the organism’s response to the environment.

Some of these epigenetic changes are more persistent, and in some cases have been shown to persist across one or more generations, a process called transgenerational epigenetic inheritance. However, the significance of this aspect has been exaggerated based on limited evidence, and there is no evidence at all that it has any affect on evolution over more than a few generations.

This is preposterous, both in the “how” and the “why” of it.

Some background reading about real science: