The £2.25 million will help fund a standardised national written exam for forensic examiners and train more female examiners, as most victims prefer to be examined by a woman but this is currently not possible.
It will also enable more examinations to be carried out in health clinics or social care facilities rather than in police premises.
The investment follows a report from HM Inspectorate of Constabulary in Scotland (HMICS) earlier this year which said Scotland was “well behind” the rest of the UK when it came to having facilities which met both the needs of victims and the necessary forensic requirements.
The report stressed there was “much more to be done” to ensure services were consistent across the country.
Scotland’s chief medical officer, Catherine Calderwood, said victims had said the service was not as good as it could be.
She told the BBC: “We have 1,800 victims of rape and serious sexual assault in Scotland at the moment.
“What we’ve had in our feedback from victims and also in Her Majesty’s Inspectorate of Constabulary report this year is that we are not providing a service across Scotland as good as it could be for those victims, at a time when they have had one of the most traumatic experiences of their lives.”
She added: “We have some areas of extremely good practice in Scotland and the feedback from victims is very good, but that service is not consistent across Scotland.
“We know, for example, most of our victims are women, but most victims would prefer to have a female examiner, when that is not possible, then a male examiner is offered
“But we don’t have enough female forensic medical examiners across Scotland for example.
“We also know that around half of our facilities for forensic examination take place in police accommodation.
“This is not what victims find the right place to be after they have had a rape or a serious sexual assault.
“We know that we would examine people in health facilities or social care facilities and that is much better for them.”
She said forensic examination training for more female doctors would start in the new year and progress was also being made in shifting examinations from police accommodation.
The Scottish Government funding will help NHS boards implement the new standards.
Justice Secretary Michael Matheson said he wanted victims to know they had been “listened” to and action was being taken to make a difference.
He added: “We know the immediate and long-term physical and psychological consequences of rape can be considerable and we are aware that current services for rape victims may not always be focused on their needs.
“These standards will reinforce the high-quality care anyone should expect after experiencing rape or sexual assault.”