Bayly was from Tunbridge Wells, Kent, England, where he attended The Skinners School. He studied at Balliol College, Oxford and graduated with a Bachelor of Arts (BA) degree. He then remained at the University of Oxford and undertook post-graduate study at St Antony's College, Oxford, completing his Doctor of Philosophy (DPhil) degree in 1970. Baylyl continued his academic career and was the Vere Harmsworth Professor of Imperial and Naval History at the University of Cambridge from 1992 to 2013. He was also a trustee of the British Museum.
In 2007, he succeeded Sir John Baker as President of St Catharine's College, Cambridge. Bayly also became the Director of Cambridge's Centre of South Asian Studies. In the same year in the Queen's Birthday Honours, it was announced that he had been appointed a Knight Bachelor 'for services to History'. He was co-editor of The New Cambridge History of India and sat on the editorial board of various academic journals. He also served on the inaugural Social Sciences jury for the Infosys Prize in 2009. He died in Hyde Park, Chicago, where he was in his second and last year as the Vivekananda Visiting Professor.