He was educated at the Christian Brothers, Abbey Grammar School in Newry. He graduated from Queen's University Belfast in 1961 with a first class honours BA in History, and attended the Institute of Historical Research, in London from 1961 to 1962. He was awarded his PhD by Queen’s in 1971 and an LLD honoris causa in 1975 for distinction in historical work. In 2007 Cosgrove obtained the Barrister-at-Law degree qualification from King's Inns but declined to take the statutory Irish exams needed to be called to the Bar by the Chief Justice of Ireland. He was reported, by the Irish edition of the Sunday Times, on 9 September 2007 to be considering taking legal action over the issue. Cosgrove is understood to be fluent in Irish but feels that the exam required by legislation passed in 1929 to be inappropriate in 2007 .
He was elected chairman of the Combined Departments of History 1991 - 1993. He became President in 1993. Disaffection in the College turned Cosgrove into a reformer. He was a founding member of the UCD branch of the Workers' Union of Ireland. He honoured his trade union principles by not passing a picket when boilermen were on strike at the College.
Cosgrove planned the ten volume Helicon History of Ireland; acted as one of its general editors; and contributed to the series the volume entitled Late Medieval Ireland, 1370-1541. A member of the Board of Editors of the Royal Irish Academy’s multi-volume A New History of Ireland, he was appointed sole editor of volume 2, to which he contributed four of its chapters. He was also the editor or co-editor of four other books on Irish history, and the author of around 20 articles or chapters in these works or in the learned journals. An active member of several learned societies and professional bodies, he was for a number of years President of the Dublin Historical Association and editor of its publications.