State prosecutor Ehtesham Qadir said Imran Ali, who had pleaded guilty during the five-day trial, was in the courtroom for the verdict.
The court concluded the trial within one-week, in accordance with an order of the Lahore High Court (LHC). Police investigators said later that they had matched DNA from eight girls' bodies, including Zainab's, with the convicted killer, Imran Ali, 24.
Seven-year-old Zainab was kidnapped from near her aunt's house in Kasur on January 4 and was found dead in a garbage heap five days later.
Zainab's brutal murder sparked anti-government demonstrations across the country.
The girl's murder ignited nationwide protests over allegations of government inaction, and a media campaign led to his arrest after years of him being on the loose. Residents told Reuters this was the 12th similar incident in the past year.
According to the victim's father Ameen Ansari, Ali - who lived nearby - had taken part in the initial protests that erupted after Zainab's body was discovered.
Ali was a neighbor of Zainab, and closed-circuit video footage from the day Ansari was abducted shows her walking off calmly with a man.
Zainab was abducted on January 4 in Kasur, a city south of Lahore, while her parents were on a pilgrimage in Saudi Arabia.
On hearing of their daughter's disappearance, the parents quickly returned home, but by that time Zainab's body had been found and preparations for her funeral and burial were underway amid tight security. "He says he became a pervert after having an addiction of watching child pornography on Internet", Qadir said.
Zainab's case has triggered a debate in Pakistan over whether to teach children how to guard against sex abuse, which otherwise is a taboo subject in the Muslim majority nation. He did not say how Imran's execution would be carried out, but many Pakistanis have demanded he be publicly hanged.