School worker James Moran is alleged to have carried out the attack at a primary school in the south of the city.
The 32-year-old, from Dalmarnock, Glasgow, appeared in private from custody at Glasgow Sheriff Court.
He was represented by defence lawyer Bill McCluskey who made no plea on Mr Moran's behalf.
Papers from the court claim Mr Moran abducted the child on 2 May and led her to a store cupboard where he removed her clothing and took a photograph of her.
He was remanded in custody and will appear again next week for a full committal hearing.
A man has appeared in court charged with abducting and sexually assaulting a girl at a Glasgow school.