Irwin attended Epsom College, read modern history at the University of Oxford, and did graduate research at the School of Oriental and African Studies (SOAS) under the supervision of Bernard Lewis. His thesis was on the Mamluk reconquest of the Crusader states, but he failed to complete it. During his studies, he converted to Islam and spent some time in a dervish monastery in Algeria. From 1972 he was a lecturer in medieval history at the University of St. Andrews. He gave up academic life in 1977 in order to write fiction, while continuing to lecture part-time at Oxford, Cambridge and SOAS. Irwin is currently a Research Associate at SOAS, and the Middle East editor of "The Times Literary Supplement". He has published a history of Orientalism and is an acknowledged expert on The Arabian Nights.