The incident took place on February 6 and was reported to the Naraina police station on Monday, they added.
Investigations revealed that the girl, who lived nearby, had gone to the public toilet when its cleaner allegedly grabbed her and raped her.
The girl narrated the ordeal to her parents following which they approached the police, they said.
The minor's condition is now stable, she said.
Police said the victim's father works as a driver and her mother is a housewife.
She also took to twitter to express her anguish over the incident.
"Now, 5 year old girl raped in Naraina by a 40 year old man. The child has suffered terribly and has bled a lot. On my way to the Hospital to see her. Delhi is truly the RAPE CAPITAL of the world. God help us all!!! (sic)", she said in a tweet.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)