It is currently against the constitution but parliament has not yet passed a bill outlawing the practice.
Omar Abdirashid Ali Sharmarke has joined more than a million others by signing an online petition calling for a comprehensive ban.
The UN children's agency, Unicef, estimates that more than 90% of Somali girls undergo FGM.
It says that it is mainly performed on four to 11-year-olds and can have a long-lasting impact on the girls' physical and mental health.
Somali anti-FGM campaigner Ifrah Ahmed told the BBC that she had persuaded Mr Sharmarke to sign the petition organised by online campaign group Avaaz.
She said that it was a significant move as many people in Somalia do not openly speak about the issue.
•Clitoridectomy - partial or total removal of the clitoris
•Excision - removal of the clitoris and inner labia (lips), with or without the outer labia
•Infibulation - cutting, removing and sewing up the genitalia
•Any other type of intentional damage to the female genitalia (burning, scraping et cetera)
Ms Ahmed, who has experienced FGM herself, thought it would help put pressure on the lawmakers to pass the bill.
She has worked with Somalia's Women's Affairs Minister Sahra Samatar in drawing up the draft legislation.
Ms Samatar told the BBC's Newsday programme that the prime minister's action was a "huge boost" to the efforts to get the law passed.
But campaigners acknowledge that it will take more than a law to end the practice.
Ms Ahmed said that an education campaign, as well as a willingness to enforce the legislation, will be necessary.
She said that it is widely practised in Somalia as people believe it is a religious requirement and girls who have not undergone it are taunted for not being cut.

The double killer, who is in his 40s, is in the process of changing his name to start a new life, the court heard.
The man, who was referred to as "C", had killed his ex-girlfriend and her new companion, the court heard.
Anonymity was "necessary" for his reintegration into the community, the judges ruled.
The anonymity issue came about after C, who was released in October, applied for a High Court judicial review of a decision by the home secretary to refuse him unescorted leave in the community.
Stephen Knafler QC, appearing for C, accepted that his crimes were "high up on the scale of horrific".
But he said legal challenges involving mental health patients should be held in private - or at least with the individual's identity protected.
Lady Hale, the court's deputy president, described C's crimes as "horrendous" and said they had caused "incalculable distress to the families of the victims".
But she said that without anonymity there was "a very real risk that the progress he has made during his long years of treatment in hospital would be put in jeopardy and his reintegration in the community, which was an important purpose of his transfer to hospital, will not succeed".
"I would therefore allow this appeal and maintain the anonymity order in place," she said.
She also said the public had a right to know what happened in the courts, and that sensible decisions were being made.
But that "right to know" had to be balanced against the potential harm the disclosure of a patient's identity could cause to the patient "and perhaps also to the hospital, those treating him and other patients".
The court judgement says the Parole Board agreed to the release of the man on life licence in September and had imposed a number of conditions.
One of the conditions was that C continues to have psychiatric treatment.
Somalia's prime minister has publicly backed a campaign to ban female genital mutilation (FGM) in his country.
[NEXT_CONCEPT]
A convicted murderer released on parole from a secure psychiatric unit has won his Supreme Court battle to keep his identity secret.