Michael R. Bloomberg, the billionaire businessman and former mayor of New York City, is donating $1.8 billion to his alma mater, Johns Hopkins University, to create a fund that would help low-income and moderate-income students attend without having to worry about the cost, his charitable organization, Bloomberg Philanthropies, announced on Sunday.

The money would expand the university’s endowment by more than 40 percent, to about $6.1 billion. The fund would be dedicated to undergraduate financial aid and recruitment, and would be enough, a university official said, to cover the full difference between the cost of attending Johns Hopkins and the amount that students and their families can afford to pay.

“America is at its best when we reward people based on the quality of their work, not the size of their pocketbook,” Mr. Bloomberg wrote in an opinion essay published online in The New York Times on Sunday. “Denying students entry to a college based on their ability to pay undermines equal opportunity. It perpetuates intergenerational poverty. And it strikes at the heart of the American dream: the idea that every person, from every community, has the chance to rise based on merit.”

The rising cost of higher education and the heavy debt loads that many students shoulder have become significant political issues in recent years. Liberal politicians like Senator Bernie Sanders of Vermont have proposed free public college tuition for all students, and states like Tennessee and New York have set up programs to significantly widen access to their state college systems for low-income students.