The school was founded in 1927 by Monsignor John Ward, Parish Priest of Magherafelt, to provide secondary education for Catholic girls of the area under the direction of the Sisters of the Holy Family of Bordeaux.
Ten girls were enrolled in the first year under the Principalship of Sister Cassian Tracey. Sister Cassian was succeeded by Sister Salome Creagh (1928 – 1937) who in turn was succeeded by Sister Philomena Cashin (1937 – 1945). Sister Salome and Sister Philomena together with Monsignor Ward dedicated themselves to securing formal recognition for the school. This was granted by the then Ministry of Education on 1st August 1945. The school flourished and grew under the energetic leadership of its next Principal, Sister Marie Therese Harte (1945 – 1977).
With the school’s continued academic success, the need for more accommodation became urgent and in 1954 the first extension was built.
September 1978 marked a significant milestone in the history of the school: 37 boys were enrolled in St. Mary’s along with 587 girls. Today St. Mary’s Grammar School has eleven hundred pupils on roll, with an equal ratio of boys and girls and serves three counties: Derry, Antrim and Tyrone.
In 1984 new accommodation was again required. Under the leadership of Sister Immaculata O’Connor, Principal (1977- 1995) the Friends of St. Mary’s was formed with the purpose of raising funds to finance the building programme. The £6 million extension was formally opened by Cardinal Daly on 8 December 1994.
The school’s first lay Principal, Mrs W A O’Kane (1995-2004) was responsible for further enhancing the academic reputation of the school and widening its extracurricular portfolio. In 2003, the latest phase of the building development programme was completed with the opening of Café Bordeaux and the new classroom extension.
Improvements to the school estate continue annually as St Mary’s is committed to providing the best possible environment for teaching and learning, living and working.
September 2004 marked another beginning in the school’s history with the appointment of its first male Principal, Mr D A Lambon. In June 2011 Mr Lambon was appointed pincipal of St Malachy's College, Belfast and a new principal Mrs Deirdre Gillespie was appointed.