Middleton and his wife, Leigh, will give the money to the School District and Drexel University, as well as to Philadelphia Youth Network and Philadelphia Academies Inc., both nonprofits focused on career development and training.
The United Way of Greater Philadelphia and Southern New Jersey will oversee distribution of the funding.
The donation comes as the district grapples with a budget deficit of as much as $282 million for the 2012-13 school year.
John Middleton said the gift symbolized his family's desire to help the disadvantaged and make Philadelphia a better place.
"In every great struggle, there comes a tipping point, that critical moment when an infusion of resources - people, effort, and assets - is necessary to prevail," he said. "For the School District, we believe that tipping point is now."
Nutter and Middleton said they believed the funding would help close the gap between workers' skills and those that employers are seeking.
They also said it would help reduce crime and other problems over the long run.
"Working people don't have time to be involved in that nonsense on the streets," Nutter said.
Middleton, whose family sold its cigar company in 2007 to Altria Group Inc. for $2.9 billion, agreed.
"Underlying the issues of violence, homelessness, and hunger," Middleton said, "there is an educational component."
The district will receive $5.7 million to pay for: hiring a career and technical education teacher; increasing professional coaching for students; and adding 6,800 students to those programs, bringing the total to 12,000 in the next five years.
The district is revamping its career and technical education program to determine how best to meet current workplace needs, district spokesman Fernando Gallard said.
He said the additional money would not affect the budget deficit, because the district had not allocated money for career and technical education.
Philadelphia Academies will receive $2.25 million to expand career training, including creating 16 career academies to be housed in four public schools.
Nutter's wife, Lisa, is president of Philadelphia Academies and played a major role in discussions that secured the gift.
Philadelphia Youth Network will get $5 million to support Council for College and Career Success efforts to boost college-graduation rates.
An additional $2 million will go to Drexel for its Digital On-Ramps program, which uses online and data-sharing technology for education and workforce development.
Drexel will also receive $1.34 million for its Center for Strategic Leadership to coach and develop leadership fellows.
Frank Linnehan, interim dean at Drexel's LeBow College of Business, said 60 city and district employees would complete 18 months of leadership training that they could then use to improve their organizations.
Christine Carlson, a Philadelphia public-school parent and advocate, recently founded a group called Greater Center City Neighborhood School Coalition, which aims to raise money, save programs, improve curriculum, and fix facilities at 12 Center City public schools. She applauded the Middleton gift as an example of the kind of community support the district needed.
"By making this investment," Carlson said, "the Middleton family is investing in the continued growth of Philadelphia and underscoring the present need for community and not-for-profit resources to actively engage in supporting public education."
She added that she hoped the district would do its best to make sure the funding primarily benefited schools and students, and "not become enmeshed in bureaucracy and the overall budget deficit."
Contact Miriam Hill at 215-854-5520 or email@example.com, or follow on Twitter @miriamhill.