All the four accused who are minors have been taken into custody, DCP (Detection) Dhananjay Kulkarni said.
They were later sent to a remand home.
The four boys, studying in classes IX and X, allegedly gangraped the 15-year-old girl on November 8 and made a video of the crime.
They then threatened the girl not to reveal the incident or else they would post the video online, Malad police station's senior inspector Shashank Sandbhor said.
One of the accused is a friend of the girl. She had gone for studies at his home in suburban Malad, where he and three of his accomplices allegedly gangraped her, he said.
The accused later posted the video of the incident on the internet and some social networking sites, police said.
The video later went viral on mobile messaging application WhatsApp and caught the attention of the victim's aunt, who then informed her parents.
Subsequently, the girl's family lodged a complaint with Malad police which took the four boys into custody on Thursday.
"We took the four boys into custody on Thursday and have sent them to Dongri remand home," Sandbhor said.
Seventh anniversary of 26/11 Mumbai terror attacks today
Mumbai cops thrash couple inside police station, caught on camera
Use cow urine to clean Mumbai hospitals: Congress corporator
10 must-try vegetarian restaurants in Mumbai
'We should not discount the ISIS threat in India'