The accident happened at the Parkson shopping centre in Fuxingmen yesterday, the Beijing Times reported.
A worker was carrying out maintenance on the escalator and had taken out a floor panel, but did not put up warning signs or safety barriers.
The girl fell into the escalator and injured her leg, Hong Kong-based South China Morning Post reported.
A doctor at the Beijing Children's Hospital was quoted as saying that the girl suffered a 25-cm long deep cut, almost to the bone.
Also Read
The girl underwent surgery for more than two hours and she is still in hospital for further observation, the report said.
The shopping mall authorities was quoted as saying that it had apologised for the accident and will tighten up safety regulations.
There have been several accidents involving escalators on the mainland over the past year.
A woman was killed in Jingzhou in Hubei province last year after falling into a gap in an escalator at a shopping centre.
She managed to throw her two-year-old son to safety before she fell into the escalator's machinery.