The 51-year-old man was fined under article 215 of France’s civil code, which states married couples must agree to a “shared communal life”.
A judge has now ruled that this law implies that “sexual relations must form part of a marriage”.
The rare legal decision came after the wife filed for divorce two years ago, blaming the break-up on her husband’s lack of activity in the bedroom.
A judge in Nice, southern France, then granted the divorce and ruled the husband named only as Jean-Louis B. was solely responsible for the split.
But the 47-year-old ex-wife then took him back to court demanding 10,000 euros in compensation for “lack of sex over 21 years of marriage”.
The ex-husband claimed “tiredness and health problems” had prevented him from being more attentive between the sheets.
But a judge in the south of France’s highest court in Aix-en-Provence ruled: “A sexual relationship between husband and wife is the expression of affection they have for each other, and in this case it was absent.
“By getting married, couples agree to sharing their life and this clearly implies they will have sex with each other.”