Hasan Ghazwani, a Saudi national, was executed in the city of Jizan, the ministry said in a statement carried by SPA state news agency.
It said Ghazwani's affair had led to a pregnancy but did not disclose their family relationship or whether the woman had delivered.
The ministry cited a saying attributed to Prophet Mohammed that stipulates death for whose who commit incest.
A Pakistani man was also executed today for smuggling drugs into the kingdom, it said in a separate statement.
Also Read
Rape, murder, apostasy, armed robbery and drug trafficking are all punishable by death under the oil-rich nation's strict version of sharia, or Islamic law.
The latest beheadings brings to 75 the number of executions carried out in Saudi Arabia this year, according to an AFP count.
In 2012, the country carried out 76 executions, according to a tally based on official figures.