Born in Ijebu-Ode, Ogun State, Ajayi was educated in Nigeria and the United Kingdom; in the latter country, he qualified in 1970 as a physician at the University of Liverpool Medical School. He also specialized in psychiatry at Memorial University in Newfoundland, Canada.

Most of Ajayi's novels and stories draw on his medical experience.

The Year (London: Macmillan, 1981).
The Lesson (Lagos, Nigeria: Granny Fatima, 1985)
The Ghost of a Millionaire (Heinemann Educational Books Nigeria, 1990).
Eyes of the Night, short story collection including his 1990 BBC World Service winning story "Family Planning" (Lagos, Nigeria: Granny Fatima, 1991),
Images of Lives: Poems for Everyone, poetry collection (Lagos, Nigeria: Granny Fatima, 1991)
Motions and Emotions: Fumes of Poetic Feelings, poetry collection (Lagos, Nigeria: Granny Fatima, 1993)
After A Bad Moon: a Sh-to-vel, story collection (Lagos, Nigeria: Granny Fatima, 1995).