Retaining graduates is hard when a city has fewer to begin with, because college graduates, like migratory birds, tend to flock to places with many other college graduates. Kelley Shomaker, 23, who graduated from the University of Dayton this year, said she searched for work in Dayton but ultimately received an offer from Rock Hill, S.C., a suburb of Charlotte, N.C. In August, she and two friends will set off for that city to start teaching careers there.

Charlotte, once a city with very little education, now has a population that is more than a third college graduates. Ms. Shomaker estimated that 60 percent of her friends were moving to other cities.

Dayton’s past was rich, but by the 2000s the city was in trouble. It lost half of its manufacturing jobs in 12 years, according to Richard Stock, an economist at the University of Dayton. When the city’s last Fortune 500 company, National Cash Register, left in 2009, residents were jolted into action.

“Our premise is you have to change people’s mind-set,” said Thomas Lasley, the former dean of education at the University of Dayton, who runs Learn to Earn, the city’s effort to increase its share of college graduates. “We have to go from one where people think of themselves as being in a high-school-attending culture to being in a college-attending culture.”

One effort has shown marked success. The Dayton Early College Academy, which opened in 2003 as a public high school, focuses on preparing low-income students for college. It sends 97 percent of its graduates to college, the vast majority to four-year programs.

One of the graduates, Francei Brown, plans to attend Morehouse College in Atlanta in the fall. His father, who for years cobbled together part-time jobs fixing cars and doing plumbing and roofing, even in the worst weather, was resolute about college for his son.