They now come up against UUJ in the last eight
Holders UCD are safely through to the quarter-final of the Sigerson Cup after seeing off IT Sligo 5-16 to 2-6.
Dublin's Jack McCaffery starred as UCD made light work of their opposition and will now face UUJ in the next round. Paul Mannion was also on hand to score a goal for the home side.
UUJ progress following their 2-15 to 0-13 extra-time victory over Garda College at Templemore.
St. Mary's edged out NUI Galway 1-9 to 1-7 and will face DCU in the quarter-final.
UCC defeated DCU St. Pat's 3-24 to 0-10.
IT Carlow move into the quarters with a 1-8 to 0-9 win over IT Tralee.
You can see highlights of St. Mary's victory over NUI Galway below.