Police said a woman who works at the retirement home called police to say she had been attacked. When the officers arrived, the body of another woman was found, gagged and tied up outside the building with three stab wounds, Agence France Press reported.
Police said the residents of the home were safe but that officers were still searching for the gunman.
Investigators said they had no evidence at this stage to suggest the attack was terror-related. The man was not known to authorities, they said.
For the time being, there is only one victim. For the moment there is no particular evidence about the motive for this crime, Montpellier prosecutor Christophe Barret told AFP.
The home was a retirement home for monks who had been missionaries in Africa. It has been identified in French media as a home run by the Society of African Missions, a missionary congregation founded in 1856 by Bishop Marion Bresillac.
Residents of the home are very elderly, with an average age of 75, although some are more than 90, said Alain Berthet, a local councillor in Montferrier-sur-Luz.
France remains in a state of emergency following a series of deadly terror attacks over the last two years.
In January 2014 there were attacks on the Charlie Hebdo magazine offices in Paris, and a kosher supermarket, in the city. In November 2015, 130 people died in a series of attacks in Paris. Then, in July 2016, 86 died when a man drove a truck through crowds in Nice.
There have also been a number of smaller attacks including the murder of a policeman and his wife in Magnanville and the murder of a priest in Normandy in July 2016.
However a source close to the investigation said as yet there was nothing to link the Montpellier attack to terrorism. The source told Reuters: Nothing at this stage would indicate that this would be a terrorist act.
The Paris anti-terrorist investigations unit is not running the investigation at this point. Local police referred to the incident as a criminal act.