Melville was forced to quit as a Dundee City councillor in February and was suspended by the SNP from his duties as an aide to Dundee East MP Stewart Hosie.
It was claimed Melville sent a number of texts to an unnamed female Muslim activist within the SNP the day after the Paris terror attacks last November.
One text he allegedly sent read: “It’s not personal I just ******* hate your religion and I’ll do all in I’m life do defeat your filth.”
Another reportedly said: “And in your favour we live in an uneducated left lift loopy left wing society who is more interested in claiming benefits and being ignorant to the threat of your horrible disease which is a make believe **** in the sky.
“Horrible murdering Islamic *****.”
A complaint was initially made to police on 18 January. Now Melville, who is the former councillor for the Maryfield ward in Dundee, has been charged and a report has been sent to the procurator fiscal.
A spokeswoman for Police Scotland said: “Police can confirm that a 35-year-old man has been charged.
“A report will now be submitted to the procurator fiscal.”
Should the Crown decide to proceed with the charges, Melville is likely to be cited to appear in court later this year.
Meanwhile, a separate investigation by the commissioner for ethical standards in public life for Scotland into the former SNP councillor has been dropped.
A spokesman for the Commissioner said: “I can confirm there is no ongoing investigation relating to a complaint about former Dundee City Councillor Craig Melville.”
Melville’s resignation triggered a by-election that took place last week.
The seat was retained by SNP candidate Lynne Short. Ms Short won just under half of first-preference votes. Turnout was 24 per cent.
Council leader Ken Guild, of the SNP, said Melville’s resignation had not been an issue with voters in the ward.