However, mayor Jean Vila could not hold the ceremony at the town hall in southern Cabestany, not far from the Spanish border, and the union between the 37- and 48-year-old men will not be officially registered.
But Vila said it "underlines the municipality's will to have the law changed".
Gay weddings are legal in neighbouring Spain and other European countries but France so far only allows same-sex partners to have civil unions, which are also open to heterosexuals.
France's first gay marriage was celebrated in 2004 but later annulled by a court.
French junior family minister Claude Greff criticised the Cabestany ceremony as a "provocation ahead of presidential elections" due in April.
But gay and lesbian rights group Inter-LGBT rejected this saying polls show "the French are in favour" of gay marriage.