Dublin City University has signed a deal to buy All Hallows college.
It follows months of negotiation over the site in Drumcondra, which is almost seven hectares in size.
The Catholic college was put on the market last year and began a wind-down of its academic operations.
The agreement will allow the existing students complete their studies.