More than 100 police converged on the fast food restaurant in the Putuo district after the man grabbed the toddler at around at 3:00 p.m. (0700 GMT), the state-run Eastday.com Web site reported. Officers were trying to negotiate the girl's release, it said.
The child's mother was in the restaurant when the girl was taken hostage but was later evacuated by police, the official Xinhua News Agency said.
Xinhua reported that the girl was 4 years old and said the man was in his 50's.
The reports did not say whether the man had made any demands.
A man who answered the phone at the Shanghai Public Security Bureau's press affairs office said he was not authorized to discuss the incident with the media. He refused to give his name.